- 10 Sep, 2014 1 commit
-
-
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 committed
-
- 26 Aug, 2014 1 commit
-
-
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.
Carlos Martín Nieto committed
-
- 18 Aug, 2014 2 commits
-
-
Jacques Germishuys committed
-
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 committed
-
- 09 Aug, 2014 1 commit
-
-
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 committed
-
- 05 Aug, 2014 15 commits
-
-
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 committed -
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.
Carlos Martín Nieto committed -
Linquize committed
-
Linquize committed
-
William Swanson committed
-
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 committed -
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.
Carlos Martín Nieto committed -
Jacques Germishuys committed
-
Jacques Germishuys committed
-
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 committed -
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.
Carlos Martín Nieto committed -
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.
Russell Belfer committed -
This lets a user decide they do want to use keyboard-interactive after they've compiled.
Carlos Martín Nieto committed -
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 committed -
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.
Carlos Martín Nieto committed
-
- 01 Aug, 2014 1 commit
-
-
treebuilder: set the attributes before sorting and inserting
Vicent Marti committed
-
- 31 Jul, 2014 1 commit
-
-
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.
Carlos Martín Nieto committed
-
- 20 Jun, 2014 1 commit
-
-
Vicent Marti committed
-
- 16 Jun, 2014 1 commit
-
-
Don't use read-write accounts for the tests
Vicent Marti committed
-
- 14 Jun, 2014 1 commit
-
-
netops: init OpenSSL once under lock
Vicent Marti committed
-
- 13 Jun, 2014 3 commits
-
-
The assembla failure we were seeing referred to a private repository, which is not what is there at the moment. This reverts 1fd21b03
Carlos Martín Nieto committed -
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 committed -
We want to check whether the credentials callback is NULL, not whether the payload is.
Carlos Martín Nieto committed
-
- 12 Jun, 2014 3 commits
-
-
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 committed -
Carlos Martín Nieto committed
-
OpenSSL's tests init everything in the main thread, so let's do that.
Carlos Martín Nieto committed
-
- 11 Jun, 2014 4 commits
-
-
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 committed -
Add docs for git_clone_local_t and move the docs for the git_clone_options to each field.
Carlos Martín Nieto committed -
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.
Carlos Martín Nieto committed -
revwalk: more sensible array handling
Vicent Marti committed
-
- 10 Jun, 2014 3 commits
-
-
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.
Carlos Martín Nieto committed -
treebuilder: insert sorted
Vicent Marti committed -
Carlos Martín Nieto committed
-
- 09 Jun, 2014 2 commits
-
-
By inserting in the right position, we can keep the vector sorted, making entry insertion almost twice as fast.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-