| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| |
| |
| | |
Patches can now come from a variety of sources - either internally
generated (from diffing two commits) or as the results of parsing
some external data.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
When we are provided some input buffer (with a length) to inflate,
and it contains more data than simply the deflated data, fail.
zlib will helpfully tell us when it is done reading (via Z_STREAM_END),
so if there is data leftover in the input buffer, fail lest we
continually try to inflate it.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Handle the application of binary patches. Include tests that
produce a binary patch (an in-memory `git_patch` object),
then enusre that the patch applies correctly.
|
| |
| |
| |
| | |
Introduce `git_zstream_inflatebuf` for simple uses.
|
| |
| |
| |
| | |
When a patch is empty, simply copy the source into the destination.
|
| | |
|
| |
| |
| |
| |
| | |
The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Avoid declaring old-style functions without any parameters.
Functions not accepting any parameters should be declared with
`void fn(void)`. See ISO C89 $3.5.4.3.
|
| | |
|
| |
| |
| |
| |
| | |
When no index file exists and a baseline is not explicitly provided, use
an empty baseline instead of trying to load `HEAD`.
|
| | |
|
| |
| |
| |
| |
| | |
Test a rebase (both a merge rebase and an inmemory rebase) with a new
commit that adds files underneath a new subfolder.
|
| |
| |
| |
| |
| | |
Read a tree into an index, write the index, then re-open the index and
ensure that we are treesame to the original.
|
| |
| |
| |
| |
| |
| |
| | |
Read a tree into an index using `git_index_read_index` (by reading
a tree into a new index, then reading that index into the current
index), then write the index back out, ensuring that our new index
is treesame to the tree that we read.
|
|/ |
|
|\
| |
| | |
test: Fix stat() test to mask out unwanted bits
|
| |
| |
| |
| | |
Haiku and Hurd both pass extra bits in struct stat::st_mode.
|
|/
|
|
|
| |
Don't generate conflicts when checking out a modified submodule and the
submodule is dirty or modified in the workdir.
|
|
|
|
|
| |
When we remove all entries in a tree, we should remove that tree from
its parent rather than include the empty tree.
|
| |
|
|
|
|
| |
This gives us trees with subdirectories, which the new test needs.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of going through the usual steps of reading a tree recursively
into an index, modifying it and writing it back out as a tree, introduce
a function to perform simple updates more efficiently.
`git_tree_create_updated` avoids reading trees which are not modified
and supports upsert and delete operations. It is not as versatile as
modifying the index, but it makes some common operations much more
efficient.
|
|\
| |
| | |
Fix `git_commit_create` for an initial commit
|
| |
| |
| |
| |
| |
| | |
`test_commit_commit__create_initial_commit_parent_not_current` was not correctly
testing that `HEAD` was not changed. Now we grab the oid that it was pointing to
before the call to `git_commit_create` and the oid that it's pointing to afterwards
and compare those.
|
| | |
|
|/ |
|
|
|
|
|
| |
Allow users to construct a signature from the type of signature
lines that actually appear in commits.
|
|
|
|
|
| |
Test that we can properly abort a rebase when it is initialized by a
revspec. This ensures that we do not conflate revspecs and refnames.
|
|\
| |
| | |
Allow creating copies of `git_reference` objects.
|
| | |
|
|\ \
| | |
| | | |
Rebase improvements with IDs
|
| | |
| | |
| | |
| | |
| | | |
When rebasing with IDs, we do not return to the `branch`,
we remain in a detached HEAD state.
|
| |/
| |
| |
| |
| | |
Instead of `open`ing a rebase and `abort`ing that, test that we can
`abort` a rebase that has just begun with `init`.
|
| |
| |
| |
| |
| |
| |
| | |
While no extra header fields are defined for tags, git accepts them by
ignoring them and continuing the search for the message. There are a few
tags like this in the wild which git parses just fine, so we should do
the same.
|
|/ |
|
|\
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
|
|
| |
When running as root, skip the unreadable file tests, because, well,
they're probably _not_ unreadable to root unless you've got some
crazy NSA clearance-level honoring operating system shit going on.
|
|\
| |
| | |
refs: provide a more general error message for dwim
|
| |
| |
| |
| |
| |
| |
| | |
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.
|