- 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
-
- 17 Sep, 2013 1 commit
-
-
Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
Carlos Martín Nieto committed
-
- 17 Jun, 2013 2 commits
-
-
Vicent Marti committed
-
Also fixed an assert typo on nulltoken's HEAD
yorah committed
-
- 30 May, 2013 1 commit
-
-
Vicent Marti committed
-
- 28 May, 2013 1 commit
-
-
Vicent Marti committed
-
- 11 May, 2013 2 commits
-
-
Carlos Martín Nieto committed
-
Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
Carlos Martín Nieto committed
-
- 06 May, 2013 1 commit
-
-
Currently git_branch_set_upstream when passed a local branch creates invalid configuration, for ex. if we setup branch 'tracking_master' to track local 'master' libgit2 generates the following config ``` [branch "track_master"] remote = . merge = .refs/heads/track_master ``` The merge value is invalid and calling git_branch_upstream on 'tracking_master' results in invalid reference error. It should do: ``` [branch "track_master"] remote = . merge = refs/heads/master ```
Nikolai Vladimirov committed
-