- 02 Jun, 2014 1 commit
-
-
This lets us work without worrying about what's happening but work on a snapshot.
Carlos Martín Nieto committed
-
- 13 May, 2014 1 commit
-
-
And decrease extra reload checks of config data.
Russell Belfer committed
-
- 26 Apr, 2014 1 commit
-
-
Carlos Martín Nieto committed
-
- 01 Apr, 2014 1 commit
-
-
There are a few places where we need to join three strings to assemble a path. This adds a simple join3 function to avoid the comparatively expensive join_n (which calls strlen on each string twice).
Russell Belfer committed
-
- 20 Mar, 2014 2 commits
-
-
Carlos Martín Nieto committed
-
On bare by default, or when core.logallrefupdates is false, we must not write the reflog.
Carlos Martín Nieto committed
-
- 19 Mar, 2014 4 commits
-
-
Given HEAD -> master -> foo, when updating foo's reflog we should also update HEAD's, as it's considered the current branch.
Carlos Martín Nieto committed -
The reflog append function was overzealous in its checking. When passed an old and new ids, it should not do any checking, but just serialize the data to a reflog entry.
Carlos Martín Nieto committed -
Remove some duplicated logic.
Carlos Martín Nieto committed -
If the caller wants to update a ref to point to the same target as it currently has, we should return early and avoid writing to the reflog.
Carlos Martín Nieto committed
-
- 18 Mar, 2014 1 commit
-
-
The existing ones lack checking zeroed ids when switching back from an unborn branch as well as what happens when detaching. The reflog appending function mistakenly wrote zeros when dealing with a detached HEAD. This explicitly checks for those situations and fixes them.
Carlos Martín Nieto committed
-
- 17 Mar, 2014 1 commit
-
-
When we update the current branch, we must also append to HEAD's reflog to keep them in sync. This is a bit of a hack, but as git.git says, it covers 100% of default cases.
Carlos Martín Nieto committed
-
- 07 Mar, 2014 1 commit
-
-
Carlos Martín Nieto committed
-
- 05 Mar, 2014 1 commit
-
-
If a directory disappears between the time we look up the entries of its parent and the time when we go to look at it, we should ignore the error and move forward. This fixes #2046.
Carlos Martín Nieto committed
-
- 10 Feb, 2014 1 commit
-
-
This addresses arrbee's concerns about wording in the conditional reference udpate functions.
Carlos Martín Nieto committed
-
- 05 Feb, 2014 7 commits
-
-
If the type of the on-disk reference has changed, the old value comparison should fail.
Carlos Martín Nieto committed -
We don't actually pass the old value yet.
Carlos Martín Nieto committed -
We will reuse this later for deletion.
Carlos Martín Nieto committed -
Add a parameter to the backend to allow checking for the old symbolic target.
Carlos Martín Nieto committed -
Free the old ref even on success.
Carlos Martín Nieto committed -
In case we loose the race to update the reference, return GIT_EMODIFIED to let the user distinguish it from other types of errors.
Carlos Martín Nieto committed -
Allow updating references if the old value matches the given one.
Carlos Martín Nieto committed
-
- 02 Feb, 2014 1 commit
-
-
Ben Straub committed
-
- 01 Feb, 2014 1 commit
-
-
Ben Straub committed
-
- 30 Jan, 2014 2 commits
-
-
Ben Straub committed
-
Ben Straub committed
-
- 11 Dec, 2013 2 commits
-
-
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 -
This adds giterr_user_cancel to return GIT_EUSER and clear any error message that is sitting around. As a result of using that in places, we need to be more thorough with capturing errors that happen inside a callback when used internally. To help with that, this also adds giterr_capture and giterr_restore so that when we internally use a foreach-type function that clears errors and converts them to GIT_EUSER, it is easier to restore not just the return value, but the actual error message text.
Russell Belfer committed
-
- 09 Dec, 2013 3 commits
-
-
The frontend used to look at the file directly, but that's obviously not the right thing to do. Expose it on the backend and use that function instead.
Carlos Martín Nieto committed -
Sometimes (e.g. stash) we want to make sure that a log will be written, even if it's not in one of the standard locations. Let's make that easier.
Carlos Martín Nieto committed -
git-core only writes to the reflogs of HEAD, refs/heads/ and, refs/notes/ or if there is already a reflog in place. Adjust our code to follow these semantics.
Carlos Martín Nieto committed
-
- 23 Nov, 2013 2 commits
-
-
Whenever a reference is created or updated, we need to write to the reflog regardless of whether the user gave us a message, so we shouldn't leave that to the ref frontend, but integrate it into the backend. This also eliminates the race between ref update and writing to the reflog, as we protect the reflog with the ref lock. As an additional benefit, this reflog append on the backend happens by appending to the file instead of parsing and rewriting it.
Carlos Martín Nieto committed -
This is as yet unused.
Carlos Martín Nieto committed
-
- 05 Nov, 2013 1 commit
-
-
Edward Thomson committed
-
- 03 Oct, 2013 2 commits
-
-
This hooks up git_path_direach and git_path_dirload so that they will take a flag indicating if directory entry names should be tested and converted from decomposed unicode to precomposed form. This code will only come into play on the Apple platform and even then, only when certain types of filesystems are used. This involved adding a flag to these functions which involved changing a lot of places in the code. This was an opportunity to do a bit of code cleanup here and there, for example, getting rid of the git_futils_cleanupdir_r function in favor of a simple flag to git_futils_rmdir_r to not remove the top level entry. That ended up adding depth tracking during rmdir_r which led to a safety check for infinite directory recursion. Yay. This hasn't actually been tested on the Mac filesystems where the issue occurs. I still need to get test environment for that.
Russell Belfer committed -
This doesn't actual do string precompose but it puts the hooks in place into the iterators and the git_path_dirload function so that the actual precompose work is ready to go.
Russell Belfer committed
-
- 02 Oct, 2013 2 commits
-
-
These functions act purely on the reflog data structure.
Carlos Martín Nieto committed -
References and their logs are logically coupled, let's make it so in the code by moving the fs-based reflog implementation to live next to the fs-based refs one. As part of the change, make the function take names rather than references, as only the names are relevant when looking up and handling reflogs.
Carlos Martín Nieto committed
-
- 24 Sep, 2013 1 commit
-
-
Edward Thomson committed
-
- 10 Sep, 2013 1 commit
-
-
nulltoken committed
-