| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
|\
| |
| | |
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.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
When a directory is removed out from underneath us, stop trying to
manipulate it.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now that iterators do not return `GIT_ENOTFOUND` when advancing
into an empty directory, we do not need a special `advance_into_or_over`
function.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Ensure that we have hit the end of iteration; previously we tested
that we saw all the values that we expected to see. We did not
then ensure that we were at the end of the iteration (and that there
were subsequently values in the iteration that we did *not* expect.)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Drop some of the layers of indirection between the workdir and the
filesystem iterators. This makes the code a little bit easier to
follow, and reduces the number of unnecessary allocations a bit as
well. (Prior to this, when we filter entries, we would allocate them,
filter them and then free them; now we do the filtering before
allocation.)
Also, rename `git_iterator_advance_over_with_status` to just
`git_iterator_advance_over`. Mostly because it's a fucking long-ass
function name otherwise.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Many code paths in checkout need the final, full on-disk path of the
file they're writing. (No surprise). However, they all munge the
`data->path` buffer themselves to get there. Provide a nice helper
method for them.
Plus, drop the use `git_iterator_current_workdir_path` which does the
same thing but different. Checkout is the only caller of this silly
function, which lets us remove it.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Refactored the tree iterator to never recurse; simply process the
next entry in order in `advance`. Additionally, reduce the number of
allocations and sorting as much as possible to provide a ~30% speedup
on case-sensitive iteration. (The gains for case-insensitive iteration
are less majestic.)
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Disambiguate the reset and reset_range functions. Now reset_range
with a NULL path will clear the start or end; reset will leave the
existing start and end unchanged.
|