| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\
| |
| | |
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
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When confronted with a conflict in the index, `git_index_add_all`
should stage the working directory copy. If there is no file in the
working directory, the conflict should simply be removed.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
cl_git_sandbox_init_new() will create a clar temp directory and
initialize a new repository at that location.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It's not always obvious the mapping between stage level and
conflict-ness. More importantly, this can lead otherwise sane
people to write constructs like `if (!git_index_entry_stage(entry))`,
which (while technically correct) is unreadable.
Provide a nice method to help avoid such messy thinking.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since a diff entry only concerns a single entry, zero the information
for the index side of a conflict. (The index entry would otherwise
erroneously include the lowest-stage index entry - generally the
ancestor of a conflict.)
Test that during status, the index side of the conflict is empty.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When diffing against an index, return a new `GIT_DELTA_CONFLICTED`
delta type for items that are conflicted. For a single file path,
only one delta will be produced (despite the fact that there are
multiple entries in the index).
Index iterators now have the (optional) ability to return conflicts
in the index. Prior to this change, they would be omitted, and callers
(like diff) would omit conflicted index entries entirely.
|
| | | | |
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
When adding a conflict for some path, remove the staged entry.
Otherwise, an illegal index (with both stage 0 and high-stage
entries) would result.
|
|\ \ \
| | | |
| | | | |
Fill the pointers for matching refspecs
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When we look for which remote corresponds to a remote-tracking branch,
we look in the refspecs to see which ones matches. If none do, we should
abort. We currently ignore the error message from this operation, so
let's not do that anymore.
As part of the test we're writing, let's test for the expected behaviour
if we cannot find a refspec which tells us what the remote-tracking
branch for a remote would look like.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
When we find out that we're dealing with a matching refspec, we set the
flag and return immediately. This leaves the strings as NULL, which
breaks the contract.
Assign these pointers to a string with the correct values.
|
|\ \ \
| |_|/
|/| | |
Tackle remote API issues from bindings
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we moved from acting on the instance to acting on the
configuration, we dropped the validation of the passed refspec, which
can lead to writing an invalid refspec to the configuration. Bring that
validation back.
|
| | |
| | |
| | |
| | |
| | |
| | | |
An anonymous remote is not configured and cannot therefore have
configured refspecs. Remove the parameter which adds this from the
constructor.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The code used to rely on the clone code calling the remote's save, which
does not happen anymore, meaning that the configuration settings the
remote expected were not being written to disk.
The run-time configuration was still being affected, so the right branch
was being cloned. The tests continued to pass as we did not check for
the configuration entires. Fix this by creating the remote with the
single-branch refspec we want and checking for its existence in the
configuration.
|
| |/
|/|
| |
| |
| | |
Git inserts a space after the SHA1 (as of 2.1.4 at least), so do the
same.
|
|\ \
| | |
| | | |
index_add_all: include untracked files in new subdirs
|
| | | |
|