Log

Author Commit Date CI Message
Carlos Martín Nieto 7a7ef2dc 2011-07-05T17:44:51 Restore config10 test file Removing a section variable doesn't remove its section header. Overwrite the config10 file so there are no changes after the test is run. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Marti 17837602 2011-07-05T15:38:26 repository: Fix unused parameter in Unix systems
Vicent Martí 2f3f28b4 2011-07-05T06:35:45 Merge pull request #302 from carlosmn/development Small fixes in pack_window_open
Vicent Martí e45e548a 2011-07-05T06:33:28 Merge pull request #299 from kiryl/examples-general-warnings Fix warning in examples/general.c
Vicent Martí 71a8e484 2011-07-05T06:32:58 Merge pull request #297 from nulltoken/patch-5 Fix MSVC compilation issue
Carlos Martín Nieto 2ee318a7 2011-07-05T15:09:17 Small fixes in pack_window_open Check if the window structure has actually been allocated before trying to access it, and don't leak said structure if the map fails. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Martí d830919a 2011-07-05T06:27:56 Merge pull request #301 from carlosmn/hashtable-include-fix Include common.h in hashtable.h
Carlos Martín Nieto 8f63d54c 2011-07-05T14:36:22 Include common.h in hashtable.h Without this, hashtable.h doesn't know what uint32_t is and the compiler thinks that it's a function type. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Martí f12aa9dc 2011-07-05T04:31:37 Merge pull request #300 from carlosmn/gsoc2011/master A bit of networking
Kirill A. Shutemov 6f2b0a3a 2011-07-05T12:00:18 examples/general: fix misc warnings examples/general.c:393:25: warning: unused variable ‘reftarget’ [-Wunused-variable] examples/general.c:357:19: warning: unused variable ‘e’ [-Wunused-variable] examples/general.c:444:1: warning: control reaches end of non-void function [-Wreturn-type] Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov d6d877d2 2011-07-05T11:54:16 examples/general: fix warnings on not handled reference type in switch examples/general.c:402:5: warning: enumeration value ‘GIT_REF_INVALID’ not handled in switch [-Wswitch] examples/general.c:402:5: warning: enumeration value ‘GIT_REF_PACKED’ not handled in switch [-Wswitch] examples/general.c:402:5: warning: enumeration value ‘GIT_REF_HAS_PEEL’ not handled in switch [-Wswitch] examples/general.c:402:5: warning: enumeration value ‘GIT_REF_LISTALL’ not handled in switch [-Wswitch] Signe-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov 51cc50a3 2011-07-05T11:43:21 examples/general: fix git_commit_create_v() arguments type general.c:208: warning: passing argument 7 of 'git_commit_create_v' from incompatible pointer type Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
nulltoken ed72182b 2011-07-05T01:09:37 Fix MSVC compilation issue
Carlos Martín Nieto 7d69f788 2011-06-28T16:48:04 Add variable writing tests Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 156af801 2011-06-28T16:27:16 Add test for section header at end of file Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto f58c53ce 2011-06-28T16:24:51 Correctly detect truncated input in header parsing If the section header is the last line in the file, parse_section_header would incorrectly decide that the input had been truncated. Fix this by checking whether the actual input line is correctly formatted. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 86b5ab16 2011-06-28T16:08:46 git_config_add_file should rethrow Otherwise, the information about why there was an error gets lost. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 2601fcfc 2011-06-28T15:21:44 Add tests for deleting a config var Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 6d4b6097 2011-06-28T15:20:42 Add git_config_del to delete a variable Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Marti 9f86ec52 2011-07-05T02:28:18 signature: Fix warnings Add extra braces to avoid ambiguous if-else. Also, free() doesn't need a check.
nulltoken a01acc47 2011-07-03T14:03:43 signature: straighten the creation of a signature - Fails on empty name and/or email - Trims leading and trailing spaces of name and email
nulltoken 42a1b5e1 2011-07-01T17:59:10 signature: enhance relaxed parsing of bogus signatures Final fix for issue #278
schu 60caf024 2011-06-28T17:06:06 t04-commit: add tests for git_signature__parse git_signature__parse used to be very strict about what's a well-formed signature. Add tests checking git_signature__parse can stick with "unexpected" signatures (IOW no author name and / or no email, etc). Signed-off-by: schu <schu-github@schulog.org>
schu 8b2c913a 2011-06-29T14:48:09 git_signature__parse: make parsing less strict git_signature__parse used to be very strict about what's a well-formed signature. Since git_signature__parse is used only when reading already existing signatures, we should not care about if it's a valid signature too much but rather show what we got. Reported-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti 1bc83ff1 2011-07-05T01:33:39 repository: Cleanup initialization
Vicent Marti eec3fe39 2011-07-05T01:11:33 fileutils: Finish dropping the old `prettify_path`
Vicent Marti 19ac1ed7 2011-07-04T21:33:26 fileops: Fix stat() on directories for W32 The `stat` methods were having issues when called with a trailing slash in Windows platforms. We now use GetFileAttributes() where possible, which doesn't have this restriction.
Vicent Marti 5ad739e8 2011-07-04T20:05:11 fileops: Drop `git_fileops_prettify_path` The old `git_fileops_prettify_path` has been replaced with `git_path_prettify`. This is a much simpler method that uses the OS's `realpath` call to obtain the full path for directories and resolve symlinks. The `realpath` syscall is the original POSIX call in Unix system and an emulated version under Windows using the Windows API.
Vicent Marti f79026b4 2011-07-04T11:43:34 fileops: Cleanup Cleaned up the structure of the whole OS-abstraction layer. fileops.c now contains a set of utility methods for file management used by the library. These are abstractions on top of the original POSIX calls. There's a new file called `posix.c` that contains emulations/reimplementations of all the POSIX calls the library uses. These are prefixed with `p_`. There's a specific posix file for each platform (win32 and unix). All the path-related methods have been moved from `utils.c` to `path.c` and have their own prefix.
Vicent Marti 678e9e04 2011-07-03T13:33:43 build: Move OS-specific compat to their own folders
Kirill A. Shutemov 932d1baf 2011-06-30T19:52:34 cleanup: remove trailing spaces Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Tim Harder 1f4f4d17 2011-07-01T17:39:03 cmake: Use system zlib if found on non-Windows systems
Vicent Marti ec626853 2011-07-01T17:34:27 zlib: Declare preprocessor directives at build time
Vicent Marti 17d52304 2011-07-01T17:26:23 build: Simplify build structure This will make libgit2 more suitable for embedding.
Vicent Marti b2cef77c 2011-06-30T21:29:42 common: Force 64 bit fileops at compile time
Vicent Marti 8a062003 2011-06-30T21:10:16 zlib: No visualization attributes. The visibility attribute is a headache on many platforms like Solaris, and not even supported on Windows.
Vicent Marti 637edc9c 2011-06-30T20:53:59 refs: Remove bogus assertion The assertion in line 360 was there to check that only loose refs were being written as loose, but there are times when we need to re-write a packed reference as loose.
Vicent Marti e0fc39da 2011-06-29T15:11:34 config: Fix unmatched parameters in docs
Vicent Martí 1f61e301 2011-06-30T07:12:42 Merge pull request #287 from kiryl/development filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE
Vicent Martí 02bc2d2f 2011-06-30T07:11:04 Merge pull request #288 from nulltoken/patch-4 GIT_EXTERN'd head_detached() and head_orphan()
nulltoken 408d733b 2011-06-30T06:56:58 repository: Make head_detached() and head_orphan() convenience methods accessible to bindings
Kirill A. Shutemov fe5babac 2011-06-30T00:16:23 filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Vicent Martí 2dfc0887 2011-06-29T12:14:29 Merge pull request #284 from nulltoken/topic/hide-git-dir Hide ".git" directory on Windows upon creation of a non bare repository
nulltoken 6ac91dfe 2011-06-29T14:06:18 Hide ".git" directory on Windows upon creation of a non bare repository Directory which name starts with a dot are hidden on Linux platforms. This patch makes libgit2 behaves similarly on Windows.
Vicent Marti cfef5fb7 2011-06-29T15:09:21 config: `foreach` now returns variable values too
Vicent Marti 7376ad99 2011-06-29T11:01:35 refs: Remove duplicate rename method `git_reference_rename` now takes a `force` flag
Carlos Martín Nieto 5f25149e 2011-06-28T22:04:27 sig: allow empty names Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti 0f489fb2 2011-06-28T21:30:15 repo: Fix git_repository_is_empty
Vicent Marti ab7941b5 2011-06-28T21:04:59 test: Properly show error messages
Vicent Marti 5cf1f909 2011-06-28T20:27:38 test: Print last error message properly
Vicent Marti c682886e 2011-06-28T21:09:22 repo: Rename HEAD-related methods
Vicent Marti e053c911 2011-06-28T19:52:41 commit: Allow spaces inside email addresses Core Git doesn't care when people use spaces in the email address, even though this kind of foolery receives the capital punishment in several states of the USA. We must obey.
Vicent Martí ccd59372 2011-06-28T10:44:19 Merge pull request #279 from carlosmn/detached-orphan Add detached and orphan convenience functions
Vicent Marti 9525e47d 2011-06-28T19:43:36 refs: Remove unused declarations
Vicent Martí 2fb520f1 2011-06-28T10:39:07 Merge pull request #277 from schu/sign-compare Fix warning: signed and unsigned type in cond expr
Vicent Marti d5afc039 2011-06-28T19:15:48 Remove redundant methods from the API A bunch of redundant methods have been removed from the external API. - All the reference/tag creation methods with `_f` are gone. The force flag is now passed as an argument to the normal create methods. - All the different commit creation methods are gone; commit creation now always requires a `git_commit` pointer for parents and a `git_tree` pointer for tree, to ensure that corrupted commits cannot be generated. - All the different tag creation methods are gone; tag creation now always requires a `git_object` pointer to ensure that tags are not created to inexisting objects.
Carlos Martín Nieto f5e09d60 2011-06-28T14:11:24 Add tests for detached and orphan Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 35502d2e 2011-06-28T13:55:00 Add git_repository_is_detached, git_repository_is_orphan Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 0ac2726f 2011-06-27T20:23:47 Slim down git_transport Remove the unused repo and private pointers and make the direction a flag, as it can only have two states. Change the connect signature to use an int instead of git_net_direction and remove that enum. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 5da5321d 2011-06-27T20:01:57 Initialize memory in git transport At the same time, do mark the transport as connected. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
schu 7b608b3b 2011-06-26T17:57:40 git_blob_create_fromfile: remove old code Remove call of gitfo_size, since we call gitfo_lstat anyway; remove some old workaround code for gitfo_read, which is obsolete now. Signed-off-by: schu <schu-github@schulog.org>
Carlos Martín Nieto 9ba49bb5 2011-06-23T03:04:23 Add git_remote_connect and git_remote_ls These allow you to implement git-ls-remote when given a reference name and a repository. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto ea7a5452 2011-06-24T16:25:26 Add gitno_buffer as a recv wrapper Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto c7c787ce 2011-06-24T18:19:00 Use gitno_buffer in the git transport This allows us to leave out the buffer handling logic. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto ce90a407 2011-06-22T15:34:37 Remove the repo param from git_transport_new Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 4e913309 2011-06-17T16:38:21 Move transports to an inheritance model Rather than an 'private' pointer, make the private structures inherit from the generic git_transport struct. This way, we only have to worry about one memory allocation instead of two. The structures are so simple that this may even make the code use less memory overall. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 0a9a38e5 2011-06-06T19:21:05 local transport: keep better track of memory Store the ref information in a private struct so we can free it together with the rest. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 7e305056 2011-06-06T18:44:19 local transport: sort the refs before resolving them By pre-sorting the references, they are already in the right order if we want to peel them. With this, we get output-parity with git.git's ls-remote. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto fd679021 2011-06-16T02:17:49 Move git_pkt_{gen_proto,send_request} to transport_git.c This is where they really belong. Remvoe the prefix and make them static. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto cbf742ac 2011-06-26T19:40:02 Use (s)size_t Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto c4d0fa85 2011-06-16T01:54:19 Implement and use git_pkt_send_request This makes it easier to send a requqest for an URL. It assumes there is a socket where the string should go out to. Make git_pkt_gen_proto accept a command parameter, which defaults to git-upload-pack Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 4e95ef02 2011-06-16T00:59:46 Implement and use gitno_send
Carlos Martín Nieto 1b4f8140 2011-06-16T00:39:35 Create netops and start moving git:// to it Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 7632e249 2011-06-13T23:01:12 Correctly handle network input Add a parameter to git_pkt_parse_line to tell it how much data you have in your buffer. If the buffer is too short, it returns an error saying so. Adapt the git transport to use this and fix the offset calculation. Add the GIT_ESHORTBUFFER error code.
Carlos Martín Nieto be9fe679 2011-06-08T23:38:22 Implement and use git_pkt_free A git_pkt object can be one of several structs. Add this function for convenience and clarity. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto ecb6ca0e 2011-06-08T13:09:47 Implement the git TCP transport up to ls-remote Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 6a9597c5 2011-06-08T19:11:38 Add function to generate a request Add git_pkt_gen_proto to crete a request from an url. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 8b9e8de5 2011-06-08T10:51:32 pkt-line: read capabilities Try to read the server capabilities and add them to the git_pkt_ref struct. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto b31803f3 2011-05-28T11:59:10 pkt-line: parse other-ref lines Add support for parsing other-ref lines. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 78fae478 2011-06-06T14:19:47 pkt: make sure we really only read the length A pkt-line's length are described in its first four bytes in ASCII hex. Copy this substring to another string before feeding it to git__strtol32. Otherwise, it will read the whole hash. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 1d27446c 2011-05-28T10:56:19 Move flush-pkt creation into its own function Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto f7fc68df 2011-05-27T12:50:07 Lay the foundations for pkt-line parsing This are the types I intend to use for pkt-line parsing and (later) creation. git_pkt serves as a base pointer type and once you know what type it is you can use the real one (command, tip list, etc.) Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto d6258deb 2011-06-25T15:10:09 Implement ls-remote on local drive Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 8f866dae 2011-05-16T22:07:08 Lay down the fundations for the network code Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto c5b2622d 2011-06-23T16:32:06 Add git_refspec_transform test Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 92cb6aa9 2011-06-23T15:41:29 Add git_refspec_transform Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto fa9dcb7e 2011-06-22T14:17:29 Add refspec match test Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 73fdf706 2011-06-21T10:55:16 Add refspec0 test Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 63f91e1c 2011-06-22T16:52:30 Add git.git's fnmatch, which is really GNU's and the git__fnmatch wrapper If the strings match, git__fnmatch returns GIT_SUCCESS and GIT_ENOMATCH on failure to match. MSVC fixes: Added a test for _MSC_VER and (in that case) defined HAVE_STRING_H to 1 so it doesn't try to include <strings.h> which doesn't exist in the MSVC world. Moved the function declarations to use the modern inline ones so MSVC doesn't have a fit. Added casts everywhere so MSVC doesn't crap its pants. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto f8f3feb0 2011-06-21T02:13:51 Add a to-do list for remotes Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto a030ae50 2011-06-20T20:21:20 Add a test for remote parsing Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 2dc31040 2011-06-20T18:58:57 Abstract the refspec query and parse Move them to their own functions to avoid duplication and to make it easier to ignore missing configuration. Not finding 'fetch' is considered fatal, though this might not be correct behaviour (push-only remotes?) Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 9c82357b 2011-06-17T18:13:14 Add a remotes API Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Martí 0b10c9ea 2011-06-26T08:33:11 Merge pull request #276 from carlosmn/development Bring back GCC flags
Carlos Martín Nieto e233fa6f 2011-06-26T16:37:04 Bring back GCC flags Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti ce90d81f 2011-06-24T15:30:10 revwalk: Do not set error string on revwalk over
Vicent Marti 8172dd43 2011-06-23T22:45:09 cmake: Do not pass `/Tc` to MSVC
Ankur Sethi 2c0ec236 2011-06-23T13:36:09 added defines for Haiku in types.h
Vicent Martí 45e82ba2 2011-06-23T04:38:38 Merge pull request #273 from GeneralMaximus/development added defines for Haiku in types.h
Vicent Marti 3101a3e5 2011-06-23T02:28:29 refs: Do not overflow when normalizing refnames