- 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 1 commit
-
-
Previously, we have extracted the logic to find and iterate over all HEADs of a repository. Use this function in `git_branch_is_checked_out`.
Patrick Steinhardt committed
-
- 13 Feb, 2017 2 commits
-
-
Restrict the ability to delete branches that are checked out in any linked repository.
Patrick Steinhardt committed -
Implement a new function that is able to determine if a branch is checked out in any repository connected to the current repository. In particular, this is required to check if for a given repository and branch, there exists any working tree connected to that repository that is referencing this branch.
Patrick Steinhardt 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
-
- 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
-
- 26 Apr, 2016 1 commit
-
-
Differentiate between the ref_name used to create an annotated_commit (that can subsequently be used to look up the reference) and the description that we resolved this with (which _cannot_ be looked up). The description is used for things like reflogs (and may be a ref name, and ID something that we revparsed to get here), while the ref name must actually be a reference name, and is used for things like rebase to return to the initial branch.
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
-
- 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
-
- 16 Mar, 2015 1 commit
-
-
We do not always want to put the id directly into the reflog, but we want to speicfy what a user typed. For this use-case we provide annotated version of a few functions which let the caller specify what user-friendly name was used when asking for the operation.
Carlos Martín Nieto committed
-
- 04 Mar, 2015 3 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 -
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 -
We want to ignore GIT_ENOTFOUND, but for that we need to capture the error code from the reflog deletion.
Carlos Martín Nieto committed
-
- 02 Mar, 2015 1 commit
-
-
Pierre-Olivier Latour committed
-
- 17 Nov, 2014 1 commit
-
-
Carlos Martín Nieto committed
-
- 08 Nov, 2014 2 commits
-
-
This gets the value from branch.<foo>.remote.
Carlos Martín Nieto committed -
This brings it in line with the rest of the lookup functions.
Carlos Martín Nieto committed
-
- 07 May, 2014 1 commit
-
-
Accessing the repository's config and immediately taking a snapshot of it is a common operation, so let's provide a convenience function for it.
Carlos Martín Nieto committed
-
- 18 Apr, 2014 1 commit
-
-
This way we can assume we have a consistent view of the config situation when we're looking up remote, branch, pack-objects, etc.
Carlos Martín Nieto committed
-
- 03 Apr, 2014 1 commit
-
-
Jacques Germishuys committed
-
- 17 Mar, 2014 1 commit
-
-
Carlos Martín Nieto committed
-
- 07 Mar, 2014 1 commit
-
-
We look up a reference in order to figure out if it's the current branch, which we need to free once we're done with the check. As a bonus, only perform the check when we're passed the force flag, as it's a useless check otherwise.
Carlos Martín Nieto committed
-
- 27 Feb, 2014 1 commit
-
-
Linquize committed
-
- 30 Jan, 2014 6 commits
-
-
Ben Straub committed
-
Ben Straub committed
-
Ben Straub committed
-
Ben Straub committed
-
Ben Straub committed
-
Russell Belfer committed
-
- 27 Jan, 2014 2 commits
-
-
Carlos Martín Nieto committed
-
Internally we already did everything with git_bufs, so this is just exposing those functions with public names.
Carlos Martín Nieto 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
-
- 13 Jan, 2014 1 commit
-
-
Signed-off-by: Brodie Rao <brodie@sf.io>
Brodie Rao committed
-
- 11 Dec, 2013 1 commit
-
-
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
-
- 05 Nov, 2013 2 commits
-
-
Arthur Schreiber committed
-
Create a git_branch_iterator type which is equivalent to the foreach but lets us write loops instead of callbacks. Since the introduction of git_reference_shorthand(), the added value of passing the name is reduced.
Carlos Martín Nieto committed
-