- 11 Dec, 2013 1 commit
-
-
This changes the behavior of callbacks so that the callback error code is not converted into GIT_EUSER and instead we propagate the return value through to the caller. Instead of using the giterr_capture and giterr_restore functions, we now rely on all functions to pass back the return value from a callback. To avoid having a return value with no error message, the user can call the public giterr_set_str or some such function to set an error message. There is a new helper 'giterr_set_callback' that functions can invoke after making a callback which ensures that some error message was set in case the callback did not set one. In places where the sign of the callback return value is meaningful (e.g. positive to skip, negative to abort), only the negative values are returned back to the caller, obviously, since the other values allow for continuing the loop. The hardest parts of this were in the checkout code where positive return values were overloaded as meaningful values for checkout. I fixed this by adding an output parameter to many of the internal checkout functions and removing the overload. This added some code, but it is probably a better implementation. There is some funkiness in the network code where user provided callbacks could be returning a positive or a negative value and we want to rely on that to cancel the loop. There are still a couple places where an user error might get turned into GIT_EUSER there, I think, though none exercised by the tests.
Russell Belfer committed
-
- 11 Nov, 2013 2 commits
-
-
Carlos Martín Nieto committed
-
The callback-based method of listing remote references dates back to the beginning of the network code's lifetime, when we didn't know any better. We need to keep the list around for update_tips() after disconnect() so let's make use of this to simply give the user a pointer to the array so they can write straightforward code instead of having to go through a callback.
Carlos Martín Nieto committed
-
- 01 Nov, 2013 2 commits
-
-
This allows us to add e.g. "HEAD" as a refspec when none are given without overwriting the user's data.
Carlos Martín Nieto committed -
The correct behaviour when a remote has no refspecs (e.g. a URL from the command-line) is to download the remote's HEAD. Let's do that. This fixes #1261.
Carlos Martín Nieto committed
-
- 02 Oct, 2013 1 commit
-
-
The text progress and update_tips callbacks are already part of the struct, which was meant to unify the callback setup, but the download one was left out.
Carlos Martín Nieto committed
-
- 10 Jun, 2013 1 commit
-
-
This is a significant reorganization of the diff code to break it into a set of more clearly distinct files and to document the new organization. Hopefully this will make the diff code easier to understand and to extend. This adds a new `git_diff_driver` object that looks of diff driver information from the attributes and the config so that things like function content in diff headers can be provided. The full driver spec is not implemented in the commit - this is focused on the reorganization of the code and putting the driver hooks in place. This also removes a few #includes from src/repository.h that were overbroad, but as a result required extra #includes in a variety of places since including src/repository.h no longer results in pulling in the whole world.
Russell Belfer committed
-
- 07 May, 2013 1 commit
-
-
When tagopt is set to '--tags', we should only take the default tags refspec into account and ignore any configured ones. Bring the code into compliance.
Carlos Martín Nieto committed
-
- 20 Apr, 2013 1 commit
-
-
A remote can have a multitude of refspecs. Up to now our git_remote's have supported a single one for each fetch and push out of simplicity to get something working. Let the remotes and internal code know about multiple remotes and get the tests passing with them. Instead of setting a refspec, the external users can clear all and add refspecs. This should be enough for most uses, though we're still missing a querying function.
Carlos Martín Nieto committed
-
- 08 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 05 Nov, 2012 1 commit
-
-
Edward Thomson committed
-
- 01 Nov, 2012 1 commit
-
-
Philip Kelley committed
-
- 24 Oct, 2012 2 commits
-
-
Ben Straub committed
-
git_indexer_stats and friends -> git_transfer_progress* Also made git_transfer_progress members more sanely named.
Ben Straub committed
-
- 20 Oct, 2012 3 commits
-
-
The fetch code takes advantage of this to implement a progress callback every 100kb of transfer.
Ben Straub committed -
Ben Straub committed
-
Also removing all the *stats parameters from external APIs that don't need them anymore.
Ben Straub committed
-
- 18 Oct, 2012 2 commits
-
-
Carlos Martín Nieto committed
-
Introduce git_remote_stop() which sets a variable that is checked by the fetch process in a few key places. If this is variable is set, the fetch is aborted.
Carlos Martín Nieto committed
-
- 15 Oct, 2012 1 commit
-
-
nulltoken committed
-
- 30 Sep, 2012 1 commit
-
-
Also honor remote.$name.tagopt = --tags.
Carlos Martín Nieto committed
-
- 05 Sep, 2012 1 commit
-
-
This refactors the diff output code so that an iterator object can be used to traverse and generate the diffs, instead of just the `foreach()` style with callbacks. The code has been rearranged so that the two styles can still share most functions. This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses that as a common error code for marking the end of iteration when using a iterator style of object.
Russell Belfer committed
-
- 25 Aug, 2012 1 commit
-
-
It's not really needed with the current code as we have EOS and the sideband's flush to tell us we're done. Keep the distinction between processed and received objects.
Carlos Martín Nieto committed
-
- 24 Aug, 2012 2 commits
-
-
This lets us notify the user of what the remote end is doing while we wait for it to start sending us the packfile.
Carlos Martín Nieto committed -
We can't always rely on the network telling us when the download is finished. Recognize it from the indexer itself.
Carlos Martín Nieto committed
-
- 04 Aug, 2012 1 commit
-
-
Otherwise we get an incomplete type error, since git_remote_callbacks isn't declared yet.
Michael Schubert committed
-
- 30 Jul, 2012 5 commits
-
-
Carlos Martín Nieto committed
-
Instad of each transport having its own function and logic to get to its refs, store them directly in transport. Leverage the new gitno_buffer to make the parsing and storing of the refs use common code and get rid of the git_protocol struct.
Carlos Martín Nieto committed -
This allows us to add capabilitites to both at the same time, keeps them in sync and removes a lot of code. gitno_buffer now uses a callback to fill its buffer, allowing us to use the same interface for git and http (which uses callbacks).
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
For the transition, http is going to keep its own logic until the git/common code catches up with the implied multi_ack that http has. This also has the side-effect of making the code cleaner and more correct regardingt he protocol.
Carlos Martín Nieto committed
-
- 28 Jun, 2012 1 commit
-
-
Not everyone who indexes a packfile wants to put it in the standard git repository location.
Carlos Martín Nieto committed
-
- 19 May, 2012 1 commit
-
-
If it's not available, an error saying so will be returned when trying to use a https:// URL. This also unifies a lot of the network code to use git_transport in many places instead of an socket descriptor.
Carlos Martín Nieto committed
-
- 17 May, 2012 1 commit
-
-
Vicent Martí committed
-
- 09 May, 2012 1 commit
-
-
These objects aren't considered as being advertised, so asking for them will cause the remote end to close the connection. This makes the checking in update_tips() unnecessary, because they don't get inserted in the list.
Carlos Martín Nieto committed
-
- 03 May, 2012 1 commit
-
-
Vicent Martí committed
-
- 25 Apr, 2012 2 commits
-
-
Trying to send every single line immediately won't give us any speed improvement and duplicates the code we need for other transports. Make the git transport use the same buffer functions as HTTP.
Carlos Martín Nieto committed -
This changes the git_remote_download() API, but the existing one is silly, so you don't get to complain. The new API allows to know how much data has been downloaded, how many objects we expect in total and how many we've processed.
Carlos Martín Nieto committed
-
- 11 Apr, 2012 1 commit
-
-
Carlos Martín Nieto committed
-
- 13 Feb, 2012 1 commit
-
-
Signed-off-by: schu <schu-github@schulog.org>
schu committed
-