| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Assert the exact amount of links we expect. While there, check that a
plain git_clone() automatically chooses to link.
|
|
|
|
|
|
|
|
| |
If requested, git_clone_local_into() will try to link the object files
instead of copying them.
This only works on non-Windows (since it doesn't have this) when both
are on the same filesystem (which are unix semantics).
|
|
|
|
|
| |
When passed the LINK_FILES flag, the recursive copy will hardlink files
instead of copying them.
|
| |
|
| |
|
|\
| |
| | |
Add support for the symref extension
|
| |
| |
| |
| |
| | |
If the remote supports the symref protocol extension, then we return
that, otherwise we guess with git's rules.
|
| |
| |
| |
| |
| | |
Add a symref_target field to git_remote_head to expose the symref
mappings to the user.
|
|\ \
| |/
|/| |
Make core.safecrlf not generate an error on LF-ending platforms
|
| |
| |
| |
| |
| |
| | |
If you enabled core.safecrlf on an LF-ending platform, we would
error even for files with all LFs. We should only be warning on
irreversible mappings, I think.
|
|/ |
|
|\
| |
| | |
Allow mirror-clone via `git_clone_into()`
|
| |
| |
| |
| |
| | |
Show a failure to perform a mirror-clone from a repository, both local
and remote.
|
| |
| |
| |
| |
| | |
The comment char is configurable and we need to provide a way for the
user to specify which comment char they chose for their message.
|
| | |
|
|\ \
| | |
| | | |
Test and fix Git diff binary detection compatibility
|
| | |
| | |
| | |
| | |
| | | |
A variety of data patterns for diffs verified to match the
behavior of binary detection with Git on the command line.
|
|\ \ \
| |/ /
|/| | |
Remote deletion
|
| | |
| | |
| | |
| | |
| | | |
When we delete a remote, we also need to go through its fetch refspecs
and remove the references they create locally.
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| | |
There are a number of tests that modify the global or system
search paths during the tests. This adds a helper function to
make it easier to restore those paths and makes sure that they
are getting restored in a manner that preserves test isolation.
|
|\ \
| | |
| | | |
Improve checks for ignore containment
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The diff code was using an "ignored_prefix" directory to track if
a parent directory was ignored that contained untracked files
alongside tracked files. Unfortunately, when negative ignore rules
were used for directories inside ignored parents, the wrong rules
were applied to untracked files inside the negatively ignored
child directories.
This commit moves the logic for ignore containment into the workdir
iterator (which is a better place for it), so the ignored-ness of
a directory is contained in the frame stack during traversal. This
allows a child directory to override with a negative ignore and yet
still restore the ignored state of the parent when we traverse out
of the child.
Along with this, there are some problems with "directory only"
ignore rules on container directories. Given "a/*" and "!a/b/c/"
(where the second rule is a directory rule but the first rule is
just a generic prefix rule), then the directory only constraint
was having "a/b/c/d/file" match the first rule and not the second.
This was fixed by having ignore directory-only rules test a rule
against the prefix of a file with LEADINGDIR enabled.
Lastly, spot checks for ignores using `git_ignore_path_is_ignored`
were tested from the top directory down to the bottom to deal with
the containment problem, but this is wrong. We have to test bottom
to top so that negative subdirectory rules will be checked before
parent ignore rules.
This does change the behavior of some existing tests, but it seems
only to bring us more in line with core Git, so I think those
changes are acceptable.
|
|\ \ \
| | | |
| | | | |
Pass unconverted Unicode path data when iconv doesn't like it
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Only on a filesystem that is composed/decomposed insensitive,
should be testing that a branch can be looked up by the opposite
form and still work correctly.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
One of the test helpers provides a quick way for looking up a
boolean key. But if the key way missing completely, the check
would actually raise an error. Given the way we use this helper,
if the key is missing, this should just return false, I think.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When using Iconv to convert unicode data and iconv doesn't like
the source data (because it thinks that it's not actual UTF-8),
instead of stopping the operation, just use the unconverted data.
This will generally do the right thing on the filesystem, since
that is the source of the non-UTF-8 path data anyhow.
This adds some tests for creating and looking up branches with
messy Unicode names. Also, this takes the helper function that
was previously internal to `git_repository_init` and makes it
into `git_path_does_fs_decompose_unicode` which is a useful in
tests to understand what the expected results should be.
|
|\ \ \ \
| | | | |
| | | | | |
Be more careful with user-supplied buffers
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This adds in missing calls to `git_buf_sanitize` and fixes a
number of places where `git_buf` APIs could inadvertently write
NUL terminator bytes into invalid buffers. This also changes the
behavior of `git_buf_sanitize` to NUL terminate a buffer if it can
and of `git_buf_shorten` to do nothing if it can.
Adds tests of filtering code with zeroed (i.e. unsanitized) buffer
which was previously triggering a segfault.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Some improvements to the cert checking
|
| | |_|/
| |/| |
| | | |
| | | |
| | | | |
This kind of stuff should have unit tests, even if it's just to show
what we expect to match successfully.
|
|\ \ \ \
| | | | |
| | | | | |
Configuration snapshotting
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When we delete an entry, we also want to refresh the configuration to
catch any changes that happened externally.
This allows us to simplify the logic, as we no longer need to delete
these variables internally. The whole state will be refreshed and the
deleted entries won't be there.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
With the isolation of complex reads, we can now try to refresh the
on-disk file before reading a value from it.
This changes the semantics a bit, as before we could be sure that a
string we got from the configuration was valid until we wrote or
refreshed. This is no longer the case, as a read can also invalidate the
pointer.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When writing out, parse the resulting file instead of adding or
replacing the value locally. This has the effect of reading external
changes as well.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In order to have consistent views of the config files for remotes,
submodules et al. and a configuration that represents what is currently
stored on-disk, we need a way to provide a view of the configuration
that does not change.
The goal here is to provide the snapshotting part by creating a
read-only copy of the state of the configuration at a particular point
in time, which does not change when a repository's main config changes.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
On set, we set/add the value written to the config's internal values,
but we do not refresh old values.
Document this in a test in preparation for the refresh changes.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Add filter options and ALLOW_UNSAFE
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It seems that with the various recent changes to reference updating
and reflog writing, that the thread safety of refdb updates has
been reduced (either that or it was never thread safe and the
window for error has increased). Either way, this test is now
sometimes segfaulting which is no good, so let's disable the test
for now. We don't really make any public promises about thread
safety for this type of operation, so I think this is acceptable,
at least in the short term.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Diff and status do not want core.safecrlf to actually raise an
error regardless of the setting, so this extends the filter API
with an additional options flags parameter and adds a flag so that
filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating
that unsafe filter application should be downgraded from a failure
to a warning.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We assume that everything under GIT_DIR/objects/ is a directory. This is
not necessarily the case if some process left a stray file in there.
Check beforehand if we do have a directory and ignore the entry
otherwise.
|
|\ \ \
| | | |
| | | | |
Reduce excessive OID calculation for diff and stat
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Trying to find other issues where tests may not clean up quite
properly when they are through...
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There are a few tests that set up a fake home directory and a
fake GLOBAL search path so that we can test things in global
ignore or attribute or config files. This cleans up that code to
work more robustly even if there is a test failure. This also
fixes some valgrind warnings where scanning search paths for
separators could end up doing a little bit of sketchy data access
when coming to the end of search list.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
There were a couple of "init_opts()" functions a few more cases
of structure initialization that I somehow missed.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Since git_diff_init_options was introduced, remove this old fn.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is a proposed adjustment to the trace APIs. This makes the
trace levels into a bitmask so that they can be selectively enabled
and adds a callback-level payload, plus a message-level payload.
This makes it easier for me to a GIT_TRACE_PERF callbacks that
are simply bypassed if the PERF level is not set.
|