- 25 Oct, 2020 1 commit
-
-
Move `git_reference__is_valid_name` to `git_reference__name_is_valid`, which returns errors and sets an out boolean parameter.
Edward Thomson committed
-
- 03 Aug, 2020 1 commit
-
-
We don't use "master" as a hardcoded default in as many places; remove the now unused master branch constant.
Edward Thomson committed
-
- 12 Jul, 2020 1 commit
-
-
With the last user of `git_reference__read_head` gone, let's remove it as it's been reading references without consulting the refdb backends.
Patrick Steinhardt committed
-
- 09 Jun, 2020 1 commit
-
-
The function `git_reference__is_note` is not declared anywhere. Let's add the declaration to avoid having non-static functions without declaration.
Patrick Steinhardt committed
-
- 13 Dec, 2019 1 commit
-
-
As git_reference__name will reallocate storage to account for longer names (it's actually allocator-dependent), it will cause all existing pointers to the old object to become dangling, as they now point to freed memory. Fix the issue by renaming to a more descriptive name, and pass a pointer to the actual reference that can safely be invalidated if the realloc succeeds.
Etienne Samson committed
-
- 17 Jan, 2019 1 commit
-
-
Update internal usage to use the `git_reference` names for constants.
Edward Thomson committed
-
- 19 Oct, 2018 1 commit
-
-
This moves the current merge analysis code into a more generic version that can work against any reference. Also change the tests to check returned analysis values exactly.
Etienne Samson committed
-
- 10 Apr, 2018 1 commit
-
-
This fixes a segfault in git_reference_owner on references returned from git_reference__read_head and git_reference_dup ones.
Etienne Samson committed
-
- 12 Jan, 2018 1 commit
-
-
This lets git know that we do in fact have written our packed-refs file sorted (which is apparently not necessarily the case) and it can then use the new-ish mmaped access which lets it avoid significant amounts of effort parsing potentially large files to get to a single piece of data.
Carlos Martín Nieto committed
-
- 03 Jul, 2017 1 commit
-
-
Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
Patrick Steinhardt committed
-
- 05 Apr, 2017 1 commit
-
-
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
-
- 21 Jan, 2017 1 commit
-
-
Fixups requested in #3912.
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
-
- 20 Nov, 2015 1 commit
-
-
These are not quite like their plain counterparts and require special handling.
Carlos Martín Nieto committed
-
- 03 Mar, 2015 2 commits
-
-
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
-
- 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
-
- 22 Jul, 2014 1 commit
-
-
Edward Thomson committed
-
- 26 Jun, 2014 1 commit
-
-
Philip Kelley 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
-
- 15 Jan, 2014 1 commit
-
-
Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
Carlos Martín Nieto committed
-
- 09 Dec, 2013 1 commit
-
-
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
-
- 08 Oct, 2013 1 commit
-
-
Before these changes, looking up a reference would return the same precomposed or decomposed form of the reference name that was used to look it up, so on MacOS which ignores the difference between the two, a single reference could be looked up either way and git_reference_name would return the form of the name that was used to look it up! This change makes lookup always return the precomposed name if core.precomposeunicode is set regardless of which version was used to look it up. The reference iterator was already returning the precomposed form from earlier work. This also updates the CMakeLists.txt rules for enabling iconv usage because the clar tests for this code were actually not being activated properly with the old version. Finally, this moves git_repository_reset_filesystem from include/ git2/repository.h to include/git2/sys/repository.h since it is not really a function that normal library users should have to think about very often.
Russell Belfer committed
-
- 26 Aug, 2013 1 commit
-
-
Nikolai Vladimirov committed
-
- 21 Aug, 2013 1 commit
-
-
The refdb_fs implementation calls realloc directly on a reference object when it wants to rename it. It is not a public object, so this doesn't mess with the immutability of references, but it does assume certain constraints on the reference representation. This commit wraps that assumption in an isolated API to isolate it.
Russell Belfer committed
-
- 02 May, 2013 2 commits
-
-
This makes parsing easier! :p
Vicent Marti committed -
Vicent Marti committed
-
- 29 Apr, 2013 1 commit
-
-
Russell Belfer committed
-
- 17 Apr, 2013 2 commits
-
-
Vicent Marti committed
-
Vicent Marti committed
-
- 07 Mar, 2013 1 commit
-
-
Edward Thomson committed
-
- 22 Feb, 2013 1 commit
-
-
nulltoken committed
-
- 16 Jan, 2013 1 commit
-
-
nulltoken committed
-
- 08 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 27 Oct, 2012 1 commit
-
-
nulltoken committed
-
- 26 Oct, 2012 1 commit
-
-
nulltoken committed
-
- 25 Oct, 2012 1 commit
-
-
Edward Thomson committed
-
- 25 Sep, 2012 1 commit
-
-
nulltoken committed
-