| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Use a diff for iteration in index_update_all and index_add_all
|
| |
| |
| |
| | |
Without this option, we would not be able to catch exec bit changes.
|
|/
|
|
|
| |
The functionality was meged without including tests, so let's add them
now.
|
|\
| |
| | |
Attributes: don't match files for folders
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
When a .gitignore specifies some folder "foo/", ensure that a file
with the same name "foo" is not ignored.
|
| |
| |
| |
| |
| |
| | |
Ensure that when examining a .gitignore in a subdirectory, we do not
erroneously apply the paths contained therein to the root of the
repository. (Fixed in c02a0e4).
|
|\ \
| | |
| | | |
Use the packbuilder in local push
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A couple of tests use the wrong remote to push to. We did not notice up
to now because the local push would copy individual objects, and those
already existed, so it became a no-op.
Once we made local push create the packfile, it became noticeable that
there was a new packfile where it didn't belong.
|
| | |
| | |
| | |
| | |
| | | |
The interesting one is the notification macro, which was returning
directly on a soft-abort instead of going through the cleanup.
|
|\ \ \
| |/ /
|/| | |
submodule: add test initialising and cloning a repo
|
| |/
| |
| |
| |
| |
| |
| |
| | |
We have a few tests checking each step, but we do not yet have a test
which tests the documented workflow for creating a submodule, namely
`setup_add` followed by cloning into it, followed by `add_finalize`.
Add such a test to protect against regressions in this workflow.
|
| |
| |
| |
| |
| | |
It has now become a no-op, so remove the function and all references to
it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The base refspecs changing can be a cause of confusion as to what is the
current base refspec set and complicate saving the remote's
configuration.
Change `git_remote_add_{fetch,push}()` to update the configuration
instead of an instance.
This finally makes `git_remote_save()` a no-op, it will be removed in a
later commit.
|
| |
| |
| |
| |
| | |
This is another option which we should not be keeping in the remote, but
is specific to each particular operation.
|
| |
| |
| |
| |
| |
| | |
While this will rarely be different from the default, having it in the
remote adds yet another setting it has to keep around and can affect its
behaviour. Move it to the options.
|
| |
| |
| |
| |
| |
| |
| | |
Instead of having it set in a different place from every other callback,
put it the main structure. This removes some state from the remote and
makes it behave more like clone, where the constructors are passed via
the options.
|
| |
| |
| |
| |
| |
| | |
As a first step in removing the repository-saving logic, don't allow
chaning the url or push url from a remote object, but change the
configuration on the configuration immediately.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having the setting be different from calling its actions was not a great
idea and made for the sake of the wrong convenience.
Instead of that, accept either fetch options, push options or the
callbacks when dealing with the remote. The fetch options are currently
only the callbacks, but more options will be moved from setters and
getters on the remote to the options.
This does mean passing the same struct along the different functions but
the typical use-case will only call git_remote_fetch() or
git_remote_push() and so won't notice much difference.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Configuration changes for handling multiple of the same sections
|
| |
| |
| |
| |
| |
| | |
If a multivar exists within two sections (of the same name)
then they should both be updated in a `set_multivar`. Ensure
that this is the case.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a test that exposes a bug in config_write.
It is valid to have multiple separate headers for the same config section, but
config_write will exit after finding the first matching section in certain
situations.
This test proves that config_write will duplicate a variable that already
exists instead of overwriting it if the variable is defined under a duplicate
section header.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we would try to be clever when writing the configuration
file and try to stop parsing (and simply copy the rest of the old
file) when we either found the value we were trying to write,
or when we left the section that value was in, the assumption being
that there was no more work to do.
Regrettably, you can have another section with the same name later
in the file, and we must cope with that gracefully, thus we read the
whole file in order to write a new file.
Now, writing a file looks even more than reading. Pull the config
parsing out into its own function that can be used by both reading
and writing the configuration.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
On Mac OS, `realpath` is deficient in determining the actual filename
on-disk as it will simply provide the string you gave it if that file
exists, instead of returning the filename as it exists. Instead we
must read the directory entries for the parent directory to get the
canonical filename.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This reverts commit 40d791545abfb3cb71553a27dc64129e1a9bec28.
|
| |
| |
| |
| |
| |
| | |
Ensure that on a case insensitive filesystem that we can checkout
into some folder 'FOLDER' that exists on disk, even if the target
of the checkout is a different case (eg 'folder').
|
|/
|
|
|
|
|
|
| |
On Windows, you might sloppily rewrite a file (or have a sloppy
text editor that does it for you) and accidentally change its
case. (eg, "README" -> "readme"). Git ignores this accidental
case changing rename during checkout and will happily write the
new content to the file despite the name change. We should, too.
|
|\
| |
| | |
Performance Improvements to Status on Windows
|
| |
| |
| |
| |
| |
| |
| |
| | |
The _next method shouldn't take a path pointer (and a path_len
pointer) as 100% of current users use the full path and ignore
the filename.
Plus let's add some docs and a unit test.
|
| | |
|
| |
| |
| |
| | |
Minimizing the number directory and file opens, minimizes the amount of IO thus reducing the overall cost of performing ignore operations.
|
|\ \
| | |
| | | |
[WIP/RFC] push: report the update plan to the caller
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It can be useful for the caller to know which update commands will be
sent to the server before the packfile is pushed up. git does this via
the pre-push hook.
We don't have hooks, but as it adds introspection into what is
happening, we can add a callback which performs the same function.
|