| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
When a refspec contains no rhs and thus won't cause an explicit update,
we skip all the logic, but that means that we don't update FETCH_HEAD
with it, which is what the implicit rhs is.
Add another bit of logic which puts those remote heads in the list of
updates so we put them into FETCH_HEAD.
|
|
|
|
|
| |
This fixes a bug where if a file was in conflicted state in either diff,
it would not always remain in conflicted state in the merged diff.
|
|
|
|
|
| |
All platforms do terrible, horrible, no good, very bad translation
when core.autocrlf=true. It's not just Windows!
|
|
|
|
|
| |
Allow files to have mixed line endings instead of skipping processing
on them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support hierarchical test resource data, such that you can have
`tests/resources/foo/bar` and move the `bar` directory in as
a fixture.
Calling `cl_fixture_sandbox` on a path that is not directly beneath
the test resources directory succeeds, placing that directory into
the test fixture. (For example, `cl_fixture_sandbox("foo/bar")`
will sandbox the `foo/bar` directory as `bar`).
Add support for cleaning up directories created this way, by only
cleaning up the basename (in this example, `bar`) from the fixture
directory.
|
|
|
|
|
| |
A corpus of files checked out with Git (Linux, 1.9.1) to ensure that
produce identical data when checking out using a CRLF filter.
|
|
|
|
|
|
| |
A corpus of files checked out with Git for Windows (2.4.1.windows.1)
to ensure that we produce identical data when checking out using a
CRLF filter.
|
|
|
|
|
|
| |
Given a variety of combinations of core.autocrlf settings and
attributes settings, test that we check out data into the working
directory the same as a known-good test resource created by git.git.
|
|
|
|
|
|
| |
Include a shell script that will generate the expected CRLF data,
calling git.git to capture its output as a test resource for the
current platform.
|
|
|
|
|
| |
Include the UTF8 and UTF8 BOM tests in the master crlf test
branch for completeness.
|
|
|
|
|
| |
Include additional test data for CRLF tests: files with mixed
line endings and binary files.
|
|
|
|
|
|
| |
This allows the user to look up fields which we don't parse in libgit2,
and allows them to access gpgsig or mergetag fields if they wish to
check the signature.
|
|
|
|
|
|
| |
Test to ensure that when status updates an index, it does not alter
the original mode for file types that are not supported (eg, symlinks
on Windows).
|
|\
| |
| | |
Fixed index being double-freed in stash tests
|
| | |
|
|\ \
| |/
|/| |
Use the checksum to check whether an index has been modified
|
| |
| |
| |
| |
| | |
This will tell us which numbers we were trying to compare, rather than
just telling us that they're different.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When ticking over one second, it can happen that the actual time ticks
over the same second between the time that we undermine our own race
protections and the time in which we perform the index update. Such
timing would make the time in the entries match the index' timestamp and
we have not gained anything.
Ticking over five seconds makes it so that if real-time rolls over that
second, our index is still ahead. This is still suboptimal as we're
dealing with timing, but five seconds should be long enough for any
reasonable test runner to finish the tests.
|
| | |
|
|/ |
|
|\
| |
| | |
Zero out racily-clean entries' file_size
|
| | |
|
| |
| |
| |
| |
| |
| | |
Provide functionality to set the time on a filesystem entry,
using utimes or futimes on POSIX type systems or SetFileTime
on Win32.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These tests want to test that we don't recalculate entries which match
the index already. This is however something we force when truncating
racily-clean entries.
Tick the index forward as we know that we don't perform the
modifications which the racily-clean code is trying to avoid.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to avoid racy-git, we zero out the file size for entries with
the same timestamp as the index (or during the initial checkout). This
is the case in a couple of crlf tests, as the code is fast enough to do
everything in the same second.
As we know that we do not perform the modification just after writing
out the index, which is what this is designed to work around, tick the
mtime of the index file such that it doesn't agree with the files
anymore, and we do not zero out these entries.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We update the index and then immediately change the contents of the
file. This makes the diff think there are no changes, as the timestamp
of the file agrees with the cached data. This is however a bug, as the
file has obviously changed contents.
The test is a bit fragile, as it assumes that the index writing and the
following modification of the file happen in the same second, but it's
enough to show the issue.
|
|\ \
| | |
| | | |
commit: ignore multiple author fields
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some tools create multiple author fields. git is rather lax when parsing
them, although fsck does complain about them. This means that they exist
in the wild.
As it's not too taxing to check for them, and there shouldn't be a
noticeable slowdown when dealing with correct commits, add logic to skip
over these extra fields when parsing the commit.
|
| |/
|/| |
|
|\ \
| | |
| | | |
Binary diffs: store deltas in the diff structure, include binary data in diff callbacks
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Introduce a new binary diff callback to provide the actual binary
delta contents to callers. Create this data from the diff contents
(instead of directly from the ODB) to support binary diffs including
the workdir, not just things coming out of the ODB.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Fix leaks in tests/checkout/icase
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| | |
We need to pass these options in order to have the credentials callback
set.
|
|/
|
|
|
| |
`git_filter_list_contains` can be used to query a filter list to
determine if a given filter will be run.
|
|\
| |
| | |
Downcase
|
| | |
|
| |
| |
| |
| |
| |
| | |
Treat input bytes as unsigned before doing arithmetic on them,
lest we look at some non-ASCII byte (like a UTF-8 character) as a
negative value and perform the comparison incorrectly.
|
|\ \
| | |
| | | |
path: error out if the callback returns an error
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the callback returns an error, we should stop immediately. This
broke when trying to make sure we pass specific errors up the chain.
This broke cancelling out of the loose backend's foreach.
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
A remote's URLs are now modified according to the url.*.insteadOf
and url.*.pushInsteadOf configurations. This allows a user to
replace URL prefixes by setting the corresponding keys. E.g.
"url.foo.insteadOf = bar" would replace the prefix "bar" with the
new prefix "foo".
|
|\ \
| | |
| | | |
Support getting SSH keys from memory, pt. 2
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We do not error on "merge conflicts"; on the contrary, merge conflicts
are a normal part of merging. We only error on "checkout conflicts",
where a change exists in the index or the working directory that would
otherwise be overwritten by performing the checkout.
This *may* happen during merge (after the production of the new index
that we're going to checkout) but it could happen during any checkout.
|
|\ \ \
| | | |
| | | | |
Include conflicts when diffing
|