- 12 Nov, 2015 2 commits
-
-
When a non-empty directory exists and prevents the creation of a reflog, provide a more informative error message.
Edward Thomson committed -
When a (non-empty) directory exists at the reference target location, complain with a more actionable error message.
Edward Thomson committed
-
- 29 Oct, 2015 1 commit
-
-
Using calloc instead of malloc because the parse error will lead to an immediate free of committer (and its properties, which can segfault on free if undefined - test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_returns_error segfaulted before the fix). #3458
Stjepan Rajko committed
-
- 28 Oct, 2015 1 commit
-
-
Vicent Marti committed
-
- 17 Sep, 2015 1 commit
-
-
Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
Edward Thomson committed
-
- 28 Aug, 2015 1 commit
-
-
Edward Thomson committed
-
- 12 Jul, 2015 1 commit
-
-
Removing a reflog upon ref deletion is something which only some backends might wish to do. Backends which are database-backed may wish to archive a reflog, log-based ones may not need to do anything.
Carlos Martín Nieto committed
-
- 08 Mar, 2015 1 commit
-
-
When we rename a reference, we want the old and new ids to be the same one (as we did not change it). The normal code path looks up the old id from the current value of the brtanch, but by the time we look it up, it does not exist anymore and thus we write a zero id. Pass the old id explicitly instead.
Carlos Martín Nieto committed
-
- 15 Feb, 2015 1 commit
-
-
Without this change, compiling with gcc and pedantic generates warning: ISO C does not allow extra ‘;’ outside of a function.
Stefan Widgren committed
-
- 03 Feb, 2015 1 commit
-
-
Jeff Hostetler committed
-
- 16 Dec, 2014 2 commits
-
-
Validate loose reference names on Win32.
Edward Thomson committed -
Disallow: 1. paths with trailing dot 2. paths with trailing space 3. paths with trailing colon 4. paths that are 8.3 short names of .git folders ("GIT~1") 5. paths that are reserved path names (COM1, LPT1, etc). 6. paths with reserved DOS characters (colons, asterisks, etc) These paths would (without \\?\ syntax) be elided to other paths - for example, ".git." would be written as ".git". As a result, writing these paths literally (using \\?\ syntax) makes them hard to operate with from the shell, Windows Explorer or other tools. Disallow these.
Edward Thomson committed
-
- 30 Sep, 2014 1 commit
-
-
A transaction allows you to lock multiple references and set up changes for them before applying the changes all at once (or as close as the backend supports). This can be used for replication purposes, or for making sure some operations run when the reference is locked and thus cannot be changed.
Carlos Martín Nieto committed
-
- 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 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
-