| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Allow creating copies of `git_reference` objects.
|
| | |
|
|\ \
| | |
| | | |
Rebase improvements with IDs
|
| | |
| | |
| | |
| | |
| | | |
When rebasing with IDs, we do not return to the `branch`,
we remain in a detached HEAD state.
|
| |/
| |
| |
| |
| |
| | |
When `init`ing a rebase from a detached HEAD, be sure to remember
that we were in a detached HEAD state so that we can correctly
`abort` the object that we just created.
|
| |
| |
| |
| |
| |
| |
| | |
While no extra header fields are defined for tags, git accepts them by
ignoring them and continuing the search for the message. There are a few
tags like this in the wild which git parses just fine, so we should do
the same.
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Proxy configuration
|
| |
| |
| |
| |
| |
| | |
We leave this up to the scheme in the url field. The type should only
tell us about whether we want a proxy and whether we want to auto-detect
it.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The path is not something that you use for proxies, so make use of the
new optionality of the path when extracting URL parts.
|
| |
| |
| |
| |
| |
| | |
When we're dealing with proxy addresses, we only want a hostname and
port, and the user would not provide a path, so make it optional so we
can use this same function to parse git as well as proxy URLs.
|
| | |
|
| | |
|
| |
| |
| |
| | |
It is currently unused; it will go into the remote's options.
|
| |
| |
| |
| |
| | |
Instead of threading the state down to the larger loop, let's have the
loop where we detect the double star so each of them are easier to read.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
In order to match the star-star, we disable the flag that's looking for
a single path element, but that leads to searching for the pattern in
the middle of elements in the input string.
Mark when we're handing a star-star so we jump over the elements in our
attempt to match the part of the pattern that comes after the star-star.
While here, tighten up the check so we don't allow invalid rules
through.
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
iterator/diff: allow trailing `/` on start/end paths to match submodules
|
| |
| |
| |
| |
| |
| | |
Allow callers to specify a start path with a trailing slash to match
a submodule, instead of just a directory. This is for some legacy
behavior that's sort of dumb, but there it is.
|
|/
|
|
|
|
| |
If we're looking for a symlink, realpath will give us the resolved path,
which is not what we're after, but a canonicalized version of the path
the user asked for.
|
|\
| |
| | |
merge_driver: fix missing `goto done;`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code initializing the merge driver registry accidentally
forgot a `goto done` in case of an error. Because of this the
next line, which registers the global shutdown callback for the
merge drivers, is only called when an error occured.
Fix this by adding the missing `goto done`. This fixes some
memory leaks when the global state is shut down.
|
|\ \
| |/
|/| |
WD iterator: properly identify submodules
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Remove duplicated calls to git_mwindow_close
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The xdl_prepare_env() function may initialise an xdlclassifier_t
data structure via xdl_init_classifier(), which allocates memory
to several fields, for example 'rchash', 'rcrecs' and 'ncha'.
If this function later exits due to the failure of xdl_optimize_ctxs(),
then this xdlclassifier_t structure, and the memory allocated to it,
is not cleaned up.
In order to fix the memory leak, insert a call to xdl_free_classifier()
before returning.
This patch was originally written by Ramsay Jones (see commit
87f16258367a3b9a62663b11f898a4a6f3c19d31 in git.git).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 307ab20b3 ("xdiff: PATIENCE/HISTOGRAM are not independent option
bits", 19-02-2012) introduced the XDF_DIFF_ALG() macro to access the
flag bits used to represent the diff algorithm requested. In addition,
code which had used explicit manipulation of the flag bits was changed
to use the macros.
However, one example of direct manipulation remains. Update this code to
use the XDF_DIFF_ALG() macro.
This patch was originally written by Ramsay Jones (see commit
5cd6978a9cfef58de061a9525f3678ade479564d in git.git).
|
|\ \
| | |
| | | |
config: don't write duplicate section
|
| | |
| | |
| | |
| | |
| | |
| | | |
If we hit the EOF while trying to write a new value, it may be that
we're already in the section that we were looking for. If so, do not
write a (duplicate) section header, just write the value.
|
|\ \ \
| |/ /
|/| | |
config: don't special-case multivars that don't exist yet
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This special-casing ignores that we might have a locked file, so the
hashtable does not represent the contents of the file we want to
write. This causes multivar writes to overwrite entries instead of add
to them when under lock.
There is no need for this as the normal code-path will write to the file
just fine, so simply get rid of it.
|
|\ \ \
| | | |
| | | | |
Some FANTASTIC iterator refactoring
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Remove some unused functions, refactor some ugliness.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Since the three iterators implement `advance_over` differently,
mandate it and implement each.
|
| | | | |
|
| | | | |
|
| | | | |
|