- 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
-
-
Patrick Steinhardt committed
-
- 01 May, 2017 1 commit
-
-
Be sure to clean up looked up references. Free buffers instead of merely clearing them. Use `git__free` instead of `free`.
Edward Thomson committed
-
- 05 Apr, 2017 2 commits
-
-
Whenever we rename a branch, we update the repository's symbolic HEAD reference if it currently points to the branch that is to be renamed. But with the introduction of worktrees, we also have to iterate over all HEADs of linked worktrees to adjust them. Do so.
Patrick Steinhardt committed -
Currently, we only provide functions to read references directly from a repository's reference store via e.g. `git_reference_lookup`. But in some cases, we may want to read files not connected to the current repository, e.g. when looking up HEAD of connected work trees. This commit implements `git_reference__read_head`, which will read out and allocate a reference at an arbitrary path.
Patrick Steinhardt committed
-
- 27 Feb, 2017 1 commit
-
-
This fixes issue #4094
Richard Ipsum committed
-
- 17 Feb, 2017 1 commit
-
-
Patrick Steinhardt committed
-
- 21 Jan, 2017 1 commit
-
-
Fixups requested in #3912.
Edward Thomson committed
-
- 29 Dec, 2016 1 commit
-
-
Error messages should be sentence fragments, and therefore: 1. Should not begin with a capital letter, 2. Should not conclude with punctuation, and 3. Should not end a sentence and begin a new one
Edward Thomson committed
-
- 27 Aug, 2016 1 commit
-
-
Introduce GIT_OPT_ENABLE_SYMBOLIC_REF_TARGET_VALIDATION option. Setting this option to 0 allows validation of a symbolic ref's target to be bypassed. This option is enabled by default. This mechanism is added primarily to address a discrepancy between git behaviour and libgit2 behaviour, whereby the former allows the symbolic ref target to carry an arbitrary string and the latter does not, so: $ git symbolic-ref refs/heads/foo bar $ cat .git/refs/heads/foo ref: bar where as attempting the same via libgit2 raises an error: The given reference name 'bar' is not valid this mechanism also allows those that might want to make use of git's more lenient treatment of symbolic ref targets to do so.
Richard Ipsum committed
-
- 22 Apr, 2016 1 commit
-
-
Arthur Schreiber committed
-
- 11 Apr, 2016 1 commit
-
-
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
-
- 28 Feb, 2016 1 commit
-
-
Edward Thomson committed
-
- 15 Jun, 2015 1 commit
-
-
Pierre-Olivier Latour committed
-
- 24 Mar, 2015 1 commit
-
-
Edward Thomson committed
-
- 03 Mar, 2015 3 commits
-
-
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 -
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
-
- 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
-
- 13 Feb, 2015 3 commits
-
-
Make our overflow checking look more like gcc and clang's, so that we can substitute it out with the compiler instrinsics on platforms that support it. This means dropping the ability to pass `NULL` as an out parameter. As a result, the macros also get updated to reflect this as well.
Edward Thomson committed -
Have the ALLOC_OVERFLOW testing macros also simply set_oom in the case where a computation would overflow, so that callers don't need to.
Edward Thomson committed -
Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
Edward Thomson committed
-
- 27 Oct, 2014 1 commit
-
-
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
-
- 30 May, 2014 2 commits
-
-
Arthur Schreiber committed
-
This fixes two issues I found when core.precomposeunicode is enabled: * When creating a reference with a NFD string, the returned git_reference would return this NFD string as the reference’s name. But when looking up the reference later, the name would then be returned as NFC string. * Renaming a reference would not honor the core.precomposeunicode and apply no normalization to the new reference name.
Arthur Schreiber committed
-
- 03 Apr, 2014 1 commit
-
-
Jacques Germishuys committed
-
- 17 Mar, 2014 1 commit
-
-
Carlos Martín Nieto committed
-
- 10 Feb, 2014 1 commit
-
-
Keep the reflog parameters as the last two, as they're the optional parameters.
Carlos Martín Nieto committed
-
- 05 Feb, 2014 7 commits
-
-
Add it under the git_reference_remove() name, letting the user pass the repo and name, analogous to unconditional setting/creation.
Carlos Martín Nieto committed -
Recognize when the reference has changed since we loaded it.
Carlos Martín Nieto committed -
We don't actually pass the old value yet.
Carlos Martín Nieto committed -
Bring the race detection goodness to symbolic references as well.
Carlos Martín Nieto committed -
Add a parameter to the backend to allow checking for the old symbolic target.
Carlos Martín Nieto committed -
Change the name to _matching() intead of _if(), and force _set_target() to be a conditional update. If the user doesn't care about the old value, they should use git_reference_create().
Carlos Martín Nieto committed -
Allow updating references if the old value matches the given one.
Carlos Martín Nieto committed
-
- 03 Feb, 2014 1 commit
-
-
Ben Straub committed
-
- 02 Feb, 2014 1 commit
-
-
Arthur Schreiber committed
-
- 30 Jan, 2014 2 commits
-
-
Ben Straub committed
-
Ben Straub committed
-