- 10 Mar, 2018 1 commit
-
-
If a reference stored in a packed-refs file does not directly point to a commit, tree or blob, the packed-refs file will also will include a fully-peeled OID pointing to the first underlying object of that type. If we try to peel a reference to an object, we will use that peeled OID to speed up resolving the object. As a reference for an annotated tag does not directly point to a commit, tree or blob but instead to the tag object, the packed-refs file will have an accomodating fully-peeled OID pointing to the object referenced by that tag. When we use the fully-peeled OID pointing to the referenced object when peeling, we obviously cannot peel that to the tag anymore. Fix this issue by not using the fully-peeled OID whenever we want to peel to a tag. Note that this does not include the case where we want to resolve to _any_ object type. Existing code may make use from the fact that we resolve those to commit objects instead of tag objects, even though that behaviour is inconsistent between packed and loose references. Furthermore, some tests of ours make the assumption that we in fact resolve those references to a commit.
Patrick Steinhardt committed
-
- 08 Jun, 2017 1 commit
-
-
Initially, the setting has been solely used to enable the use of `fsync()` when creating objects. Since then, the use has been extended to also cover references and index files. As the option is not yet part of any release, we can still correct this by renaming the option to something more sensible, indicating not only correlation to objects. This commit renames the option to `GIT_OPT_ENABLE_FSYNC_GITDIR`. We also move the variable from the object to repository source code.
Patrick Steinhardt committed
-
- 05 May, 2017 1 commit
-
-
Support '..' and '...' ranges where one side is not specified. The unspecified side defaults to HEAD. Closes #4223
William Bain committed
-
- 06 Mar, 2017 1 commit
-
-
These simple tests only ensure that we enforce the existence of a namespace; these mirror the rugged tests, they are not exhaustive.
Edward Thomson committed
-
- 02 Mar, 2017 1 commit
-
-
Edward Thomson committed
-
- 01 Mar, 2017 1 commit
-
-
Patrick Steinhardt committed
-
- 28 Feb, 2017 6 commits
-
-
This test ensures that the string '(merge)' is included in the reflog when a merge commit is made.
Richard Ipsum committed -
Windows doesn't support it.
Edward Thomson committed -
Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` -> `GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
Edward Thomson committed -
When fsync'ing files, fsync the parent directory in the case where we rename a file into place, or create a new file, to ensure that the directory entry is flushed correctly.
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
- 25 Feb, 2017 2 commits
-
-
Use C style comments as per style guide, and fix mismatching indentation.
Richard Ipsum committed -
This test ensures that it's possible to create a symbolic ref that has arbitrary data as its target. It also ensures it's possible to obtain the target of that symbolic reference from the git_reference object.
Richard Ipsum committed
-
- 13 Feb, 2017 2 commits
-
-
Add a new branch that causes a merge conflict to `testrepo` so that we are able to test merging in worktrees.
Patrick Steinhardt committed -
Patrick Steinhardt committed
-
- 29 Dec, 2016 1 commit
-
-
Edward Thomson committed
-
- 04 Nov, 2016 1 commit
-
-
The code correctly detects that forced creation of a branch on a nonbare repo should not be able to overwrite a branch which is the HEAD reference. But there's no reason to prevent this on a bare repo, and in fact, git allows this. I.e., git branch -f master new_sha works on a bare repo with HEAD set to master. This change fixes that problem, and updates tests so that, for this case, both the bare and nonbare cases are checked for correct behavior.
John Fultz committed
-
- 22 Apr, 2016 1 commit
-
-
Arthur Schreiber committed
-
- 11 Apr, 2016 2 commits
-
-
When we turned strict object creation validation on by default, we forgot to inform the refs::create tests of this. They, in fact, believed that strict object creation was off by default. As a result, their cleanup function went and turned strict object creation off for the remaining tests.
Edward Thomson committed -
If we cannot dwim the input, set the error message to be explicit about that. Otherwise we leave the error for the last failed lookup, which can be rather unexpected as it mentions a remote when the user thought they were trying to look up a branch.
Carlos Martín Nieto committed
-
- 03 Mar, 2016 1 commit
-
-
Carlos Martín Nieto committed
-
- 28 Feb, 2016 1 commit
-
-
Edward Thomson committed
-
- 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
-
- 03 Nov, 2015 1 commit
-
-
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
-
- 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
-
- 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
-
- 26 Jun, 2015 1 commit
-
-
Vicent Marti committed
-
- 22 May, 2015 1 commit
-
-
When we look for which remote corresponds to a remote-tracking branch, we look in the refspecs to see which ones matches. If none do, we should abort. We currently ignore the error message from this operation, so let's not do that anymore. As part of the test we're writing, let's test for the expected behaviour if we cannot find a refspec which tells us what the remote-tracking branch for a remote would look like.
Carlos Martín Nieto committed
-
- 13 May, 2015 1 commit
-
-
The base refspecs changing can be a cause of confusion as to what is the current base refspec set and complicate saving the remote's configuration. Change `git_remote_add_{fetch,push}()` to update the configuration instead of an instance. This finally makes `git_remote_save()` a no-op, it will be removed in a later commit.
Carlos Martín Nieto committed
-
- 16 Mar, 2015 1 commit
-
-
This also brings the soft-reset tests back to life. The function name was missing an underscore, meaning they had not been running.
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
-
- 04 Mar, 2015 2 commits
- 03 Mar, 2015 4 commits
-
-
This changes the get_entry() method to return a refcounted version of the config entry, which you have to free when you're done. This allows us to avoid freeing the memory in which the entry is stored on a refresh, which may happen at any time for a live config. For this reason, get_string() has been forbidden on live configs and a new function get_string_buf() has been added, which stores the string in a git_buf which the user then owns. The functions which parse the string value takea advantage of the borrowing to parse safely and then release the entry.
Carlos Martín Nieto committed -
We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
Carlos Martín Nieto committed -
This namespace is about behaving like git's branch command, so let's do exactly that instead of taking a reflog message. This override is still available via the reference namespace.
Carlos Martín Nieto committed -
The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
Carlos Martín Nieto committed
-