Log

Author Commit Date CI Message
Jacques Germishuys 05713621 2014-09-25T15:35:00 Silence unused return value warning
Jacques Germishuys c02c5308 2014-09-25T15:29:35 Ensure patch is initialized to zero, otherwise, the allocated flag may be set
Jakub Čajka b9334652 2014-06-11T16:00:04 Fixed odb foreach test failure for big-endian 64-bit
Jacques Germishuys f975fe90 2014-09-25T12:05:26 Introduce GIT_ALIGN
Jakub Čajka 8a89bdae 2014-06-11T09:37:15 Fixed merge REUC test for big-endian 64-bit
Jacques Germishuys 6004658d 2014-09-25T15:29:03 Silence uninitialized warning
Jacques Germishuys e8b6f55f 2014-09-25T13:07:36 The raw index buffer content is not guaranteed to be aligned * Ensure alignment by copying the content into a structure on the stack
Jacques Germishuys 55f72c19 2014-09-25T12:05:48 Ensure pool data is aligned on an 8 byte boundary
Anurag Gupta (OSG) 2f83bfce 2014-10-09T11:44:05 git_filter: dup the filter name
Linquize 68fce7f0 2014-10-04T23:27:06 config: Fix multiple trailing spaces before comments not completely trimmed
Linquize a97157af 2014-09-05T22:31:53 When auto follow tags, FETCH_HEAD should list only newly followed tags
Carlos Martín Nieto e0235452 2014-09-10T18:28:19 global: free the error message when exiting a thread When we free the global state at thread termination, we must also free the error message in order not to leak the string once per thread.
William Swanson b5935779 2014-09-24T12:01:14 Correctly handle getaddrinfo return result The getaddrinfo function indicates failure with a non-zero return code, but this code is not necessarily negative. On platforms like Android where the code is positive, a failed call causes libgit2 to segfault.
Jacques Germishuys ba5cef03 2014-09-24T13:24:39 Recurse ignored directories when stashing
Carlos Martín Nieto 80ddaec7 2014-09-30T16:27:53 Include git2/odb_backend.h in git2.h Since this isn't under sys/ we need to have it included in the main git2.h file. This fixes #2551.
Carlos Martín Nieto 59fbaa4b 2014-09-24T11:20:43 cherrypick: the name is still git_cherry_pick A backported fix makes use of the new name for git_cherry_pick (namely git_cherrypick), but we still need to use the old one in the maint branch.
Jacques Germishuys c12bc323 2014-09-12T22:37:15 Remove local unused index_repo variable
Jacques Germishuys 9a8126e0 2014-09-12T22:53:56 Only check for workdir conflicts if the index has merged files Passing 0 as the length of the paths to check to git_diff_index_to_workdir results in all files being treated as conflicting, that is, all untracked or modified files in the worktree is reported as conflicting
Jacques Germishuys edb2b835 2014-09-12T21:59:09 Added test case to illustrate bogus conflicts detected if no files were merged, and untracked files exist in the workdir.
Carlos Martín Nieto c93d1eba 2014-09-04T16:46:14 ssh: store error message immediately after a failed agent call When the call to the agent fails, we must retrieve the error message just after the function call, as other calls may overwrite it. As the agent authentication is the only one which has a teardown and there does not seem to be a way to get the error message from a stored error number, this tries to introduce some small changes to store the error from the agent. Clearing the error at the beginning of the loop lets us know whether the agent has already set the libgit2 error message and we should skip it, or if we should set it.
Carlos Martín Nieto ebee4d55 2014-08-26T15:09:47 pack: return the correct final offset The callers of git_packfile_unpack() expect the obj_offset argument to be set to the beginning of the next object. We were mistakenly returning the the offset of the object's data, which causes the CRC function to try to use the wrong offset. Set obj_offset to curpos instead of elem->offset to point to the next element and bring back expected behaviour.
Jacques Germishuys b401dc9e 2014-08-15T22:51:19 git_remote_ls() should return an error if the transport is not available
Carlos Martín Nieto 7d729d0b 2014-08-16T22:12:13 http: make sure we can consume the data we request The recv buffer (parse_buffer) and the buffer have independent sizes and offsets. We try to fill in parse_buffer as much as possible before passing it to the http parser. This is fine most of the time, but fails us when the buffer is almost full. In those situations, parse_buffer can have more data than we would be able to put into the buffer (which may be getting full if we're towards the end of a data sideband packet). To work around this, we check if the space we have left on our buffer is smaller than what could come from the network. If this happens, we make parse_buffer think that it has as much space left as our buffer, so it won't try to retrieve more data than we can deal with. As the start of the data may no longer be at the start of the buffer, we need to keep track of where it really starts (data_offset) and use that in our calculations for the real size of the data we received from the network. This fixes #2518.
Carlos Martín Nieto ea971905 2014-08-09T10:56:50 config: a multiline var can start immediately In the check for multiline, we traverse the backslashes from the end backwards and int the end assert that we haven't gone past the beginning of the line. We make sure of this in the loop condition, but we also check in the return value. However, for certain configurations, a line in a multiline variable might be empty to aid formatting. In that case, 'end' == 'start', since we ended up looking at the first char which made it a multiline. There is no need for the (end > start) check in the return, since the loop guarantees we won't go further back than the first char in the line, and we do accept the first char to be the final backslash. This fixes #2483.
Carlos Martín Nieto b4d00c1d 2014-07-25T08:25:41 array: mark the array to grow as volatile This works around strict aliasing rules letting some versions of GCC (particularly on RHEL 6) thinking that they can skip updating the size of the array when calculating the next element's offset.
Carlos Martín Nieto f3f9dc07 2014-07-24T16:46:59 revwalk: remove preallocation of the uninteresting commits Preallocating two commits doesn't make much sense as leaving allocation to the first array usage will allocate a sensible size with room for growth. This preallocation has also been hiding issues with strict aliasing in the tests, as we have fairly simple histories and never trigger the growth.
Linquize 440a87a1 2014-07-16T21:54:53 Add unit test to test add section without lf at EOF
Linquize 190fe072 2014-07-16T21:09:53 Make sure \n is at the end of config file before a new section is written
William Swanson ace65671 2014-07-09T14:12:30 Properly report failure when expanding a packfile
Carlos Martín Nieto f8b4093a 2014-07-04T17:17:23 refspec: support asterisks in the middle of a pattern We used to assume a refspec would only have an asterisk in the middle of their respective pattern. This has not been a valid assumption for some time now with git. Instead of assuming where the asterisk is going to be, change the logic to treat each pattern as having two halves with a replacement bit in the middle, where the asterisk is.
Carlos Martín Nieto 0aa6b7e6 2014-07-04T17:16:17 refspec: short-circuit non-pattern refspecs on transform When transforming a non-pattern refspec, we simply need to copy over the opposite string. Move that logic up to the wrapper so we can assume a pattern refspec in the transformation function.
Jacques Germishuys 18cf389c 2014-07-03T20:20:00 Include libssh2.h before git2.h (transport.h)
Jacques Germishuys dbcb7518 2014-07-03T20:19:16 Fix git_cred_ssh_interactive_callback signature
Carlos Martín Nieto 0e594633 2014-07-03T02:34:32 netops: error out on url without a path In order to connect to a remote server, we need to provide a path to the repository we're interested in. Consider the lack of path in the url an error.
Carlos Martín Nieto 12dcc6ee 2014-07-02T12:49:51 ssh: libssh2_channel_write() behaves like send() When the stream writing function was written, it assume that libssh2_channel_write() would always write all of the data to the wire. This is only true for the first 32k of data, which it tries to fit into one ssh packet. Since it can perform short writes, call it in a loop like we do for send(), advancing the buffer offset.
Russell Belfer 38ddf227 2014-06-30T12:05:25 Round up pool alloc sizes for alignment To make sure that items returned from pool allocations are aligned on nice boundaries, this rounds up all pool allocation sizes to a multiple of 8. This adds a small amount of overhead to each item. The rounding up could be made optional with an extra parameter to the pool initialization that turned on rounding only for pools where item alignment actually matters, but I think for the extra code and complexity that would be involved, that it makes sense just to burn a little bit of extra memory and enable this all the time.
Carlos Martín Nieto 63ee946d 2014-06-30T23:18:37 ssh: always declare the libssh2 types This lets a user decide they do want to use keyboard-interactive after they've compiled.
Carlos Martín Nieto aa1b62ba 2014-06-30T10:03:36 ssh: create the right callback signature based on build options When linking against libssh2, create the transport.h such that it contains its definition for custom crypto and keyboard-interactive callbacks. If we don't link against libssh2, create an equivalent signature which has void pointers instead of pointers to libssh2 structures. This would be one way to fix #2438.
Carlos Martín Nieto 1d430056 2014-06-30T09:19:05 ssl: init only once without threads The OpenSSL library-loading functions do not expect to be called multiple times. Add a flag in the non-threaded libgit2 init so we only call once. This fixes #2446.
Vicent Marti 58383387 2014-08-01T15:21:13 Merge pull request #2494 from libgit2/cmn/treebuilder-set-attribute treebuilder: set the attributes before sorting and inserting
Carlos Martín Nieto b6925681 2014-07-31T21:16:40 treebuilder: set the attributes before sorting and inserting We need to set the attributes before we try to insert it into the vector, as the comparison function needs to know whether the entry is a tree or not.
Vicent Marti 28f087c8 2014-06-20T14:42:16 libgit2 v0.21.0
Vicent Marti 1589aa0c 2014-06-16T11:11:40 Merge pull request #2425 from libgit2/cmn/clone-auth-change Don't use read-write accounts for the tests
Vicent Marti e93206e0 2014-06-14T12:58:03 Merge pull request #2421 from libgit2/cmn/init-ssl-once netops: init OpenSSL once under lock
Carlos Martín Nieto 09561d33 2014-06-13T22:27:46 test: remove assembla clone test The assembla failure we were seeing referred to a private repository, which is not what is there at the moment. This reverts 1fd21b0342f
Carlos Martín Nieto 3382d8b1 2014-06-13T22:24:43 test: use read-only account Don't write in plaintext the password of an account which has full control over the repository. Instead use an account with read-only access.
Carlos Martín Nieto 9c3e4e97 2014-06-13T02:35:33 http: fix typo in credentials logic We want to check whether the credentials callback is NULL, not whether the payload is.
Carlos Martín Nieto 081e76ba 2014-06-12T16:20:52 ssl: init everything all the time Bring together all of the OpenSSL initialization to git_threads_init() so it's together and doesn't need locks. Moving it here also gives us libssh2 thread safety (when built against openssl).
Carlos Martín Nieto 8f897b6f 2014-06-12T14:50:08 ssl: init also without threads
Carlos Martín Nieto cf15ac8a 2014-06-12T03:20:34 ssl: cargo-cult thread safety OpenSSL's tests init everything in the main thread, so let's do that.
Carlos Martín Nieto 5fa04943 2014-06-11T23:19:48 ssl: use locking When using in a multithreaded context, OpenSSL needs to lock, and leaves it up to application to provide said locks. We were not doing this, and it's just luck that's kept us from crashing up to now.
Carlos Martín Nieto 76f76162 2014-06-11T21:14:45 remote: update documentation Add docs for git_clone_local_t and move the docs for the git_clone_options to each field.
Carlos Martín Nieto 1d3364ac 2014-06-11T20:52:15 netops: init OpenSSL once under lock The OpenSSL init functions are not reentrant, which means that running multiple fetches in parallel can cause us to crash. Use a mutex to init OpenSSL, and since we're adding this extra checks, init it only once.
Vicent Marti 3f3d21ba 2014-06-11T18:56:24 Merge pull request #2417 from libgit2/cmn/revwalk-array-fix revwalk: more sensible array handling
Carlos Martín Nieto f9a97667 2014-06-11T00:06:44 revwalk: more sensible array handling Instead of using a sentinel empty value to detect the last commit, let's check for when we get a NULL from popping the stack, which lets us know when we're done. The current code causes us to read uninitialized data, although only on RHEL/CentOS 6 in release mode. This is a readability win overall.
Vicent Marti 7064cdaf 2014-06-10T12:56:11 Merge pull request #2416 from libgit2/cmn/treebuilder-insert-sorted treebuilder: insert sorted
Carlos Martín Nieto 17fbf852 2014-06-10T03:53:26 pathspec: use C guards in header
Carlos Martín Nieto 2c11d2ee 2014-06-09T23:23:53 treebuilder: insert sorted By inserting in the right position, we can keep the vector sorted, making entry insertion almost twice as fast.
Carlos Martín Nieto 281da004 2014-06-09T19:35:41 remote: fix rename docs
Carlos Martín Nieto 47fae920 2014-06-08T20:01:45 Merge branch 'cmn/soversion' into development
Carlos Martín Nieto 4fb32a44 2014-06-08T20:01:02 Bump version to 0.21.0 Bump library version to 0.21.0 and SONAME to 21
Carlos Martín Nieto 99807672 2014-06-08T19:42:54 Change SOVERSION at API breaks Since the SOVERSION doesn't need to follow the library's version and simply needs to be monotonically increasing whenever we release something that breaks the ABI, we can set some number and allow multiple versions of the library to be installed side-by-side. We start here with the minor version as that's what we release for now, and it allows to backport this change to earlier versions.
Vicent Marti ce5e6617 2014-06-08T16:44:32 Merge pull request #2407 from libgit2/cmn/remote-rename-more More remote rename fixes
Vicent Marti 9560203d 2014-06-08T16:44:14 Merge pull request #2409 from phkelley/win32_thread_fixes Win32: Fix object::cache::threadmania test on x64
Philip Kelley 1b4e29b7 2014-06-07T13:56:39 React to review feedback
Philip Kelley fb591767 2014-06-07T12:51:48 Win32: Fix object::cache::threadmania test on x64
Philip Kelley df192198 2014-06-07T12:37:49 Merge pull request #2408 from phkelley/win32_test_fixes Win32 test fixes
Philip Kelley daf2a648 2014-06-07T12:18:56 Win32: Fix diff::workdir::submodules test #2361
Philip Kelley 6d1b0438 2014-06-07T12:18:24 Win32: Fix failing clone_mirror test
Carlos Martín Nieto 231f350d 2014-06-06T22:55:34 remote: don't free the remote on delete This was a bad idea. Don't free except in the free function.
Carlos Martín Nieto d1544564 2014-06-06T22:38:26 remote: handle symrefs when renaming A symref inside the namespace gets renamed, we should make it point to the target's new name. This is for the origin/HEAD -> origin/master type of situations.
Carlos Martín Nieto eb6aa791 2014-06-06T22:01:35 remote: failing test for renaming with a symref
Carlos Martín Nieto 72bca13e 2014-06-06T16:33:54 remote: return problem refspecs instead of using a callback There is no reason why we need to use a callback here. A string array fits better with the usage, as this is not an event and we don't need anything from the user.
Carlos Martín Nieto 61dcfe14 2014-06-06T15:57:37 remote: make sure the name stays valid on rename We must make sure that the name pointer remains valid, so make sure to allocate the new one before freeing the old one and swap them so the user never sees an invalid pointer.
Carlos Martín Nieto 5a49ff9f 2014-06-06T15:54:42 remote: remove rename code for anonymous remotes We don't allow renames of anonymous remotes, so there's no need to handle them. A remote is always associated with a repository, so there's no need to check for that.
Vicent Marti 716e20b4 2014-06-06T13:37:22 Merge pull request #2404 from libgit2/cmn/remote-rename-fixes Remote rename fixes
Vicent Marti c073184e 2014-06-06T13:35:29 Merge pull request #2405 from arthurschreiber/patch-4 Update AUTHORS
Arthur Schreiber 05554d83 2014-06-06T11:01:20 Update AUTHORS Add me. :)
Carlos Martín Nieto a52ab4b8 2014-06-06T01:09:49 remote: tighten up reference renaming Tighten up which references we consider for renaming so we don't try to rename unrelated ones and end up with unexplained references. If there is a reference on the target namespace, git overwrites it, so let's do the same.
Carlos Martín Nieto fe3b9d07 2014-06-06T00:54:11 remote: failing test for rename When there is a reference in the target namespace, we should overwrite it. Instead it gets a different name under the current code.
Vicent Marti 90befde4 2014-06-03T22:10:34 Merge pull request #2399 from libgit2/cmn/path-to-path clone: re-use the local transport's path resolution
Russell Belfer dfcba09e 2014-06-03T13:05:20 Merge pull request #2395 from libgit2/cmn/ref-iter-concurrent Concurrent ref iterator access
Carlos Martín Nieto 18d7896c 2014-06-03T21:47:53 clone: re-use the local transport's path resolution Whe already worked out the kinks with the function used in the local transport. Expose it and make use of it in the local clone method instead of trying to work it out again.
Vicent Marti bccb36eb 2014-06-03T17:25:59 Merge pull request #2389 from arthurschreiber/arthur/set-error-when-no-remote-found Remote: Set an error when a remote cannot be found.
Vicent Marti eb27d296 2014-06-03T17:23:43 Merge pull request #2396 from libgit2/cmn/docstuff Documentation formatting fixes
Carlos Martín Nieto 69a1a691 2014-06-03T16:18:08 Plug a leak in the tests
Carlos Martín Nieto dedfc734 2014-06-02T19:21:24 index: split GIT_IDXENTRY into two flag enums The documentation has shown this as a single enum for a long time. These should in fact be two enums. One with the bits for the flags and another with the bits for the extended flags.
Carlos Martín Nieto 11e2665e 2014-06-02T18:53:32 Formatting fixes for the docs These are some issues I found while playing around with the new parser for docurium.
Carlos Martín Nieto 2d945f82 2014-06-02T17:44:51 refs: copy the packed refs on iteration This lets us work without worrying about what's happening but work on a snapshot.
Carlos Martín Nieto 4ee2543c 2014-06-02T16:46:47 refs: failing test for concurrent ref access If we remove a reference while we're iterating through the packed refs, the position in the iterator will be off.
Vicent Marti 2f6f6ebc 2014-06-01T16:26:44 Merge pull request #2392 from libgit2/cmn/remote-delete remote: build up the list of refs to remove
Carlos Martín Nieto 8a9419aa 2014-06-01T02:16:07 remote: build up the list of refs to remove When removing the remote-tracking branches, build up the list and remove in two steps, working around an issue with the iterator. Removing while we're iterating over the refs can cause us to miss references.
Vicent Marti 9bc2813b 2014-05-31T19:59:41 Merge pull request #2391 from libgit2/rb/clean-up-diff-binary-print Minor fixes to binary diff code
Russell Belfer bc81220d 2014-05-31T10:19:55 minor cleanups
Russell Belfer 947a58c1 2014-05-30T13:19:49 Clean up the handling of large binary diffs
Arthur Schreiber d723dbed 2014-05-30T19:26:49 Remote: Set an error when a remote cannot be found. Inside `git_remote_load`, the calls to `get_optional_config` use `giterr_clear` to unset any errors that are set due to missing config keys. If neither a fetch nor a push url config was found for a remote, we should set an error again.
Vicent Marti 4cf82685 2014-05-30T19:07:59 Merge pull request #2388 from ethomson/safecrlf_ignore_warn Ignore core.safecrlf=warn until we have a warn infrastructure
Edward Thomson 49837fd4 2014-05-30T11:30:53 Ignore core.safecrlf=warn until we have a warn infrastructure
Vicent Marti 58eea5eb 2014-05-30T15:28:05 Merge pull request #2358 from arthurschreiber/arthur/normalize-ref-names-on-creation Respect core.precomposeunicode = true in more cases.
Arthur Schreiber 9d6c3d28 2014-05-30T15:15:54 Refs: Extend unicode test for branch creation. This adds another assertion to ensure that the reference name inside the git_reference struct returned by `git_branch_create` is returned as precomposed if `core.precomposeunicode` is enabled.