|
11ef76a9
|
2022-01-22T13:31:02
|
|
index: use a byte array for checksum
The index's checksum is not an object ID, so we should not use the
`git_oid` type. Use a byte array for checksum calculation and storage.
Deprecate the `git_index_checksum` function without a replacement. This
is an abstraction that callers should not care about (and indeed do not
seem to be using).
Remove the unused `git_index__changed_relative_to` function.
|
|
90df4302
|
2022-01-05T12:18:05
|
|
Fix typos
|
|
4591e76a
|
2021-12-10T15:19:59
|
|
blob: identify binary content
Introduce `git_blob_data_is_binary` to examine a blob's data, instead of
the blob itself. A replacement for `git_buf_is_binary`.
|
|
ca14942e
|
2021-11-11T13:28:08
|
|
tests: declare functions statically where appropriate
|
|
95117d47
|
2021-10-31T09:45:46
|
|
path: separate git-specific path functions from util
Introduce `git_fs_path`, which operates on generic filesystem paths.
`git_path` will be kept for only git-specific path functionality (for
example, checking for `.git` in a path).
|
|
f0e693b1
|
2021-09-07T17:53:49
|
|
str: introduce `git_str` for internal, `git_buf` is external
libgit2 has two distinct requirements that were previously solved by
`git_buf`. We require:
1. A general purpose string class that provides a number of utility APIs
for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
can take ownership of.
By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.
Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class. The name also
is an homage to Junio Hamano ("gitstr").
The public API remains `git_buf`, and has a much smaller footprint. It
is generally only used as an "out" param with strict requirements that
follow the documentation. (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)
Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
|
|
ba3595af
|
2021-09-13T16:25:00
|
|
diff: deprecate diff_format_email
`git_diff_format_email` is deprecated in favor of `git_email_create`.
|
|
3f13d2e8
|
2021-09-13T10:36:48
|
|
email: allow `git_diff_commit_as_email` to take 0 as patch index
Allow a `0` patch index and `0` patch count; in this case, simply don't
display these in the email.
|
|
1ee3c37f
|
2021-05-19T09:31:30
|
|
Merge branch 'pr/5853'
|
|
6b1f6e00
|
2021-05-18T12:21:15
|
|
diff: test ignore-blank-lines
|
|
2d24690c
|
2021-04-15T07:48:43
|
|
Add testcase
|
|
d525e063
|
2021-05-10T23:04:59
|
|
buf: remove internal `git_buf_text` namespace
The `git_buf_text` namespace is unnecessary and strange. Remove it,
just keep the functions prefixed with `git_buf`.
|
|
9293e165
|
2020-10-04T21:41:28
|
|
Merge pull request #5494 from kevinjswinton/master
Fix binary diff showing /dev/null
|
|
a94fedc1
|
2020-10-04T18:04:01
|
|
Merge pull request #5620 from dlax/parse-patch-add-delete-no-index
patch_parse: handle absence of "index" header for new/deleted cases
|
|
ec26b16d
|
2020-08-29T10:44:40
|
|
diff stats: fix segfaults with new files
|
|
74293ea0
|
2020-08-29T16:46:47
|
|
patch_parse: handle absence of "index" header for new/deleted cases
This follows up on 11de594f85479e4804b07dc4f7b33cfe9212bea0 which added
support for parsing patches without extended headers (the "index
<hash>..<hash> <mode>" line); issue #5267.
We now allow transition from "file mode" state to "path" state directly
if there is no "index", which will happen for patches adding or deleting
files as demonstrated in added test case.
|
|
c708e5e5
|
2020-06-05T14:11:34
|
|
Merge pull request #5541 from libgit2/ethomson/clar_tap
clar: add tap output option
|
|
cad7a1ba
|
2020-06-05T08:42:38
|
|
clar: include the function name
|
|
06d69dfc
|
2020-05-01T12:39:48
|
|
diff::parse: don't include `diff.h`
We don't call any internal functions in the test; we don't need to
include `../src/diff.h`.
|
|
3414d470
|
2020-05-23T16:27:56
|
|
diff::workdir: actually test the buffers
The static test data is erroneously initialized with a length of 0 for
three of the strings. This means the tests are not actually examining
those strings. Provide the length.
|
|
e72ade87
|
2020-04-18T11:32:56
|
|
Fix binary diff showing /dev/null
Fixes issue where a changed binary file's content in the working
tree isn't displayed correctly, instead showing an oid of zero,
and with its path being reported incorrectly as "/dev/null".
|
|
17670ef2
|
2020-02-04T10:58:51
|
|
tests: diff: add test to verify behaviour with empty dir ordering
It was reported that, given a file "abc.txt", a diff will be shown if an
empty directory "abb/" is created, but not if "abd/" is created. Add a
test to verify that we do the right thing here and do not depend on any
ordering.
|
|
b0691db3
|
2020-01-31T09:39:12
|
|
tests: diff: verify that we are able to diff with empty subtrees
While it is not allowed for a tree to have an empty tree as child (e.g.
an empty directory), libgit2's tree builder makes it easy to create such
trees. As a result, some applications may inadvertently end up with such
an invalid tree, and we should try our best and handle them.
One such case is when diffing two trees, where one of both trees has
such an empty subtree. It was reported that this will cause our diff
code to fail. While I wasn't able to reproduce this error, let's still
add a test that verifies we continue to handle them correctly.
|
|
ece5bb5e
|
2019-11-07T14:10:00
|
|
diff: make patchid computation work with all types of commits.
Current implementation of patchid is not computing a correct patchid
when given a patch where, for example, a new file is added or removed.
Some more corner cases need to be handled to have same behavior as git
patch-id command.
Add some more tests to cover those corner cases.
Signed-off-by: Gregory Herrero <gregory.herrero@oracle.com>
|
|
11de594f
|
2019-10-16T22:11:33
|
|
patch_parse: handle patches without extended headers
Extended header lines (especially the "index <hash>..<hash> <mode>") are
not required by "git apply" so it import patches. So we allow the
from-file/to-file lines (--- a/file\n+++ b/file) to directly follow the
git diff header.
This fixes #5267.
|
|
b61810bf
|
2019-09-28T15:52:25
|
|
patch_parse: handle patches with new empty files
Patches containing additions of empty files will not contain diff data
but will end with the index header line followed by the terminating
sequence "-- ". We follow the same logic as in cc4c44a and allow "-- "
to immediately follow the index header.
|
|
e54343a4
|
2019-06-29T09:17:32
|
|
fileops: rename to "futils.h" to match function signatures
Our file utils functions all have a "futils" prefix, e.g.
`git_futils_touch`. One would thus naturally guess that their
definitions and implementation would live in files "futils.h" and
"futils.c", respectively, but in fact they live in "fileops.h".
Rename the files to match expectations.
|
|
658022c4
|
2019-07-18T13:53:41
|
|
configuration: cvar -> configmap
`cvar` is an unhelpful name. Refactor its usage to `configmap` for more
clarity.
|
|
5d92e547
|
2019-06-08T17:28:35
|
|
oid: `is_zero` instead of `iszero`
The only function that is named `issomething` (without underscore) was
`git_oid_iszero`. Rename it to `git_oid_is_zero` for consistency with
the rest of the library.
|
|
0b5ba0d7
|
2019-06-06T16:36:23
|
|
Rename opt init functions to `options_init`
In libgit2 nomenclature, when we need to verb a direct object, we name
a function `git_directobject_verb`. Thus, if we need to init an options
structure named `git_foo_options`, then the name of the function that
does that should be `git_foo_options_init`.
The previous names of `git_foo_init_options` is close - it _sounds_ as
if it's initializing the options of a `foo`, but in fact
`git_foo_options` is its own noun that should be respected.
Deprecate the old names; they'll now call directly to the new ones.
|
|
30c06b60
|
2019-03-22T23:56:10
|
|
patch_parse.c: Handle CRLF in parse_header_start
|
|
9d65360b
|
2019-03-29T12:30:37
|
|
tests: diff: test parsing diffs with a new file with spaces in its path
Add a test that verifies that we are able to parse patches which add a
new file that has spaces in its path.
|
|
f673e232
|
2018-12-27T13:47:34
|
|
git_error: use new names in internal APIs and usage
Move to the `git_error` name in the internal API for error-related
functions.
|
|
168fe39b
|
2018-11-28T14:26:57
|
|
object_type: use new enumeration names
Use the new object_type enumeration names within the codebase.
|
|
18e71e6d
|
2018-11-28T13:31:06
|
|
index: use new enum and structure names
Use the new-style index names throughout our own codebase.
|
|
e5090ee3
|
2018-10-04T11:19:28
|
|
diff_stats: use git's formatting of renames with common directories
In cases where a file gets renamed such that the directories containing
it previous and after the rename have a common prefix, then git will
avoid printing this prefix twice and instead format the rename as
"prefix/{old => new}". We currently didn't do anything like that, but
simply printed "prefix/old -> prefix/new".
Adjust our behaviour to instead match upstream. Adjust the test for this
behaviour to expect the new format.
|
|
3148efd2
|
2018-10-04T11:13:57
|
|
tests: verify diff stats with renames in subdirectory
Until now, we didn't have any tests that verified that our format for
renames in subdirectories is correct. While our current behaviour is no
different than for renames that do not happen with a common prefix
shared between old and new file name, we intend to change the format to
instead match the format that upstream git uses.
Add a test case for this to document our current behaviour and to show
how the next commit will change that format.
|
|
0652abaa
|
2018-07-20T12:56:49
|
|
Merge pull request #4702 from tiennou/fix/coverity
Assorted Coverity fixes
|
|
6dfc8bc2
|
2018-07-09T23:10:05
|
|
Merge pull request #4719 from pks-t/pks/delta-oob
Delta OOB access
|
|
8455a270
|
2018-07-01T12:04:27
|
|
tests: add missing cl_git_pass to tests
Reported by Coverity, CID 1393678-1393697.
|
|
7db25870
|
2018-06-29T07:45:18
|
|
delta: fix sign-extension of big left-shift
Our delta code was originally adapted from JGit, which itself adapted it
from git itself. Due to this heritage, we inherited a bug from git.git
in how we compute the delta offset, which was fixed upstream in
48fb7deb5 (Fix big left-shifts of unsigned char, 2009-06-17). As
explained by Linus:
Shifting 'unsigned char' or 'unsigned short' left can result in sign
extension errors, since the C integer promotion rules means that the
unsigned char/short will get implicitly promoted to a signed 'int' due to
the shift (or due to other operations).
This normally doesn't matter, but if you shift things up sufficiently, it
will now set the sign bit in 'int', and a subsequent cast to a bigger type
(eg 'long' or 'unsigned long') will now sign-extend the value despite the
original expression being unsigned.
One example of this would be something like
unsigned long size;
unsigned char c;
size += c << 24;
where despite all the variables being unsigned, 'c << 24' ends up being a
signed entity, and will get sign-extended when then doing the addition in
an 'unsigned long' type.
Since git uses 'unsigned char' pointers extensively, we actually have this
bug in a couple of places.
In our delta code, we inherited such a bogus shift when computing the
offset at which the delta base is to be found. Due to the sign extension
we can end up with an offset where all the bits are set. This can allow
an arbitrary memory read, as the addition in `base_len < off + len` can
now overflow if `off` has all its bits set.
Fix the issue by casting the result of `*delta++ << 24UL` to an unsigned
integer again. Add a test with a crafted delta that would actually
succeed with an out-of-bounds read in case where the cast wouldn't
exist.
Reported-by: Riccardo Schirone <rschiron@redhat.com>
Test-provided-by: Riccardo Schirone <rschiron@redhat.com>
|
|
f9e28026
|
2018-06-18T20:37:18
|
|
patch_parse: populate line numbers while parsing diffs
|
|
ecf4f33a
|
2018-02-08T11:14:48
|
|
Convert usage of `git_buf_free` to new `git_buf_dispose`
|
|
9d83a2b0
|
2018-02-22T22:55:50
|
|
Sanitize the hunk header to ensure it contains UTF-8 valid data
The diff driver truncates the hunk header text to 80 bytes, which can truncate
4-byte Unicode characters and introduce garbage characters in the diff
output. This change sanitizes the hunk header before it is displayed.
This mirrors the test in git: https://github.com/git/git/blob/master/t/t4025-hunk-header.sh
Closes https://github.com/libgit2/rugged/issues/716
|
|
cd6a4323
|
2018-04-04T21:29:03
|
|
typo: Fixed a trivial typo in test function.
|
|
ce7080a0
|
2018-02-20T10:38:27
|
|
diff_tform: fix rename detection with rewrite/delete pair
A rewritten file can either be classified as a modification of its
contents or of a delete of the complete file followed by an addition of
the new content. This distinction becomes important when we want to
detect renames for rewrites. Given a scenario where a file "a" has been
deleted and another file "b" has been renamed to "a", this should be
detected as a deletion of "a" followed by a rename of "a" -> "b". Thus,
splitting of the original rewrite into a delete/add pair is important
here.
This splitting is represented by a flag we can set at the current delta.
While the flag is already being set in case we want to break rewrites,
we do not do so in case where the `GIT_DIFF_FIND_RENAMES_FROM_REWRITES`
flag is set. This can trigger an assert when we try to match the source
and target deltas.
Fix the issue by setting the `GIT_DIFF_FLAG__TO_SPLIT` flag at the delta
when it is a rename target and `GIT_DIFF_FIND_RENAMES_FROM_REWRITES` is
set.
|
|
80e77b87
|
2018-02-20T10:03:48
|
|
tests: add rename-rewrite scenarios to "renames" repository
Add two more scenarios to the "renames" repository. The first scenario
has a major rewrite of a file and a delete of another file, the second
scenario has a deletion of a file and rename of another file to the
deleted file. Both scenarios will be used in the following commit.
|
|
d91da1da
|
2018-02-20T09:54:58
|
|
tests: diff::rename: use defines for commit OIDs
While we frequently reuse commit OIDs throughout the file, we do not
have any constants to refer to these commits. Make this a bit easier to
read by giving the commit OIDs somewhat descriptive names of what kind
of commit they refer to.
|
|
2388a9e2
|
2017-12-15T10:47:01
|
|
diff_file: properly refcount blobs when initializing file contents
When initializing a `git_diff_file_content` from a source whose data is
derived from a blob, we simply assign the blob's pointer to the
resulting struct without incrementing its refcount. Thus, the structure
can only be used as long as the blob is kept alive by the caller.
Fix the issue by using `git_blob_dup` instead of a direct assignment.
This function will increment the refcount of the blob without allocating
new memory, so it does exactly what we want. As
`git_diff_file_content__unload` already frees the blob when
`GIT_DIFF_FLAG__FREE_BLOB` is set, we don't need to add new code
handling the free but only have to set that flag correctly.
|
|
cc4c44a9
|
2017-09-01T09:37:05
|
|
patch_parse: fix parsing patches only containing exact renames
Patches which contain exact renames only will not contain an actual diff
body, but only a list of files that were renamed. Thus, the patch header
is immediately followed by the terminating sequence "-- ". We currently
do not recognize this character sequence as a possible terminating
sequence. Add it and create a test to catch the failure.
|
|
89a34828
|
2017-06-16T13:34:43
|
|
diff: implement function to calculate patch ID
The upstream git project provides the ability to calculate a so-called
patch ID. Quoting from git-patch-id(1):
A "patch ID" is nothing but a sum of SHA-1 of the file diffs
associated with a patch, with whitespace and line numbers ignored."
Patch IDs can be used to identify two patches which are probably the
same thing, e.g. when a patch has been cherry-picked to another branch.
This commit implements a new function `git_diff_patchid`, which gets a
patch and derives an OID from the diff. Note the different terminology
here: a patch in libgit2 are the differences in a single file and a diff
can contain multiple patches for different files. The implementation
matches the upstream implementation and should derive the same OID for
the same diff. In fact, some code has been directly derived from the
upstream implementation.
The upstream implementation has two different modes to calculate patch
IDs, which is the stable and unstable mode. The old way of calculating
the patch IDs was unstable in a sense that a different ordering the
diffs was leading to different results. This oversight was fixed in git
1.9, but as git tries hard to never break existing workflows, the old
and unstable way is still default. The newer and stable way does not
care for ordering of the diff hunks, and in fact it is the mode that
should probably be used today. So right now, we only implement the
stable way of generating the patch ID.
|
|
c0eba379
|
2017-03-14T11:01:19
|
|
diff_parse: correctly set options for parsed diffs
The function `diff_parsed_alloc` allocates and initializes a
`git_diff_parsed` structure. This structure also contains diff options.
While we initialize its flags, we fail to do a real initialization of
its values. This bites us when we want to actually use the generated
diff as we do not se the option's version field, which is required to
operate correctly.
Fix the issue by executing `git_diff_init_options` on the embedded
struct.
|
|
ad5a909c
|
2017-03-14T09:39:37
|
|
patch_parse: fix parsing minimal trailing diff line
In a diff, the shortest possible hunk with a modification (that is, no
deletion) results from a file with only one line with a single character
which is removed. Thus the following hunk
@@ -1 +1 @@
-a
+
is the shortest valid hunk modifying a line. The function parsing the
hunk body though assumes that there must always be at least 4 bytes
present to make up a valid hunk, which is obviously wrong in this case.
The absolute minimum number of bytes required for a modification is
actually 2 bytes, that is the "+" and the following newline. Note: if
there is no trailing newline, the assumption will not be offended as the
diff will have a line "\ No trailing newline" at its end.
This patch fixes the issue by lowering the amount of bytes required.
|
|
ace3508f
|
2017-03-14T10:37:47
|
|
patch_generate: fix `git_diff_foreach` only working with generated diffs
The current logic of `git_diff_foreach` makes the assumption that all
diffs passed in are actually derived from generated diffs. With these
assumptions we try to derive the actual diff by inspecting either the
working directory files or blobs of a repository. This obviously cannot
work for diffs parsed from a file, where we do not necessarily have a
repository at hand.
Since the introduced split of parsed and generated patches, there are
multiple functions which help us to handle patches generically, being
indifferent from where they stem from. Use these functions and remove
the old logic specific to generated patches. This allows re-using the
same code for invoking the callbacks on the deltas.
|
|
610cff13
|
2016-10-09T16:05:48
|
|
Merge branch 'pr/3809'
|
|
dc5cfdba
|
2016-06-02T23:18:31
|
|
make git_diff_stats_to_buf not show 0 insertions or 0 deletions
|
|
b859faa6
|
2016-08-23T23:38:39
|
|
Teach `git_patch_from_diff` about parsed diffs
Ensure that `git_patch_from_diff` can return the patch for parsed diffs,
not just generate a patch for a generated diff.
|
|
1a79cd95
|
2016-04-26T01:18:01
|
|
patch: show copy information for identical copies
When showing copy information because we are duplicating contents,
for example, when performing a `diff --find-copies-harder -M100 -B100`,
then show copy from/to lines in a patch, and do not show context.
Ensure that we can also parse such patches.
|
|
9eb19381
|
2016-04-25T22:35:55
|
|
patch::parse: test diff with exact rename and copy
|
|
8a670dc4
|
2016-04-25T18:08:03
|
|
patch::parse: test diff with simple rename
|
|
e774d5af
|
2016-04-25T16:47:48
|
|
diff::parse tests: test parsing a diff
Test that we can create a diff file, then parse the results and
that the two are identical in-memory.
|
|
7166bb16
|
2016-04-25T00:35:48
|
|
introduce `git_diff_from_buffer` to parse diffs
Parse diff files into a `git_diff` structure.
|
|
9be638ec
|
2016-04-19T15:12:18
|
|
git_diff_generated: abstract generated diffs
|
|
2e0391f4
|
2016-04-02T11:33:00
|
|
diff: test submodules are found with trailing `/`
Test that submodules are found when the are included in a pathspec
but have a trailing slash.
|
|
de034cd2
|
2016-03-18T10:59:38
|
|
iterator: give the tests a proper hierarchy
Iterator tests were split over repo::iterator and diff::iterator,
with duplication between the two. Move them to iterator::index,
iterator::tree, and iterator::workdir.
|
|
df25daef
|
2016-01-04T12:12:24
|
|
Added clar test for #3568
|
|
be30387e
|
2016-02-25T16:05:18
|
|
iterators: refactored tree iterator
Refactored the tree iterator to never recurse; simply process the
next entry in order in `advance`. Additionally, reduce the number of
allocations and sorting as much as possible to provide a ~30% speedup
on case-sensitive iteration. (The gains for case-insensitive iteration
are less majestic.)
|
|
684b35c4
|
2016-02-25T15:11:14
|
|
iterator: disambiguate reset and reset_range
Disambiguate the reset and reset_range functions. Now reset_range
with a NULL path will clear the start or end; reset will leave the
existing start and end unchanged.
|
|
60a194aa
|
2016-03-20T11:00:12
|
|
tree: re-use the id and filename in the odb object
Instead of copying over the data into the individual entries, point to
the originals, which are already in a format we can use.
|
|
e23efa6d
|
2016-03-03T21:03:10
|
|
tests: take the version from our define
|
|
4afe536b
|
2016-02-28T16:02:49
|
|
tests: use legitimate object ids
Use legitimate (existing) object IDs in tests so that we have the
ability to turn on strict object validation when running tests.
|
|
5663d4f6
|
2016-02-18T12:31:56
|
|
Merge pull request #3613 from ethomson/fixups
Remove most of the silly warnings
|
|
35439f59
|
2016-02-11T12:24:21
|
|
win32: introduce p_timeval that isn't stupid
Windows defines `timeval` with `long`, which we cannot
sanely cope with. Instead, use a custom timeval struct.
|
|
3679ebae
|
2016-02-11T23:37:52
|
|
Horrible fix for #3173.
|
|
254e0a33
|
2015-11-24T13:43:43
|
|
diff: include commit message when formatting patch
When formatting a patch as email we do not include the commit's
message in the formatted patch output. Implement this and add a
test that verifies behavior.
|
|
87428c55
|
2015-11-20T20:48:51
|
|
Fix some warnings
|
|
1c34b717
|
2015-11-08T05:10:18
|
|
Merge pull request #3498 from ethomson/windows_symlinks
Diff: Honor `core.symlinks=false` and fake symlinks
|
|
f20480ab
|
2015-11-03T09:40:30
|
|
diff: test "symlinks" in wd are respected on win32
When `core.symlinks = false`, we write the symlinks content (target)
to a regular file. We should ensure that when we later see that
regular file, we treat it specially - and that changing that regular
file would actually change the symlink target. (For compatibility
with Git for Windows).
|
|
3138ad93
|
2015-07-16T10:17:16
|
|
Add diff progress callback.
|
|
bbe1957b
|
2015-10-21T12:09:29
|
|
tests: Fix warnings
|
|
e4b2b919
|
2015-09-25T10:37:41
|
|
Fix binary diffs
git expects an empty line after the binary data:
literal X
...binary data...
<empty_line>
The last literal block of the generated patches were not containing the required empty line. Example:
diff --git a/binary_file b/binary_file
index 3f1b3f9098131cfecea4a50ff8afab349ea66d22..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644
GIT binary patch
literal 8
Pc${NM&PdElPvrst3ey5{
literal 6
Nc${NM%g@i}0ssZ|0lokL
diff --git a/binary_file2 b/binary_file2
index 31be99be19470da4af5b28b21e27896a2f2f9ee2..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644
GIT binary patch
literal 8
Pc${NM&PdElPvrst3ey5{
literal 13
Sc${NMEKbZyOexL+Qd|HZV+4u-
git apply of that diff results in:
error: corrupt binary patch at line 9: diff --git a/binary_file2 b/binary_file2
fatal: patch with only garbage at line 10
The proper formating is:
diff --git a/binary_file b/binary_file
index 3f1b3f9098131cfecea4a50ff8afab349ea66d22..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644
GIT binary patch
literal 8
Pc${NM&PdElPvrst3ey5{
literal 6
Nc${NM%g@i}0ssZ|0lokL
diff --git a/binary_file2 b/binary_file2
index 31be99be19470da4af5b28b21e27896a2f2f9ee2..86e5c1008b5ce635d3e3fffa4434c5eccd8f00b6 100644
GIT binary patch
literal 8
Pc${NM&PdElPvrst3ey5{
literal 13
Sc${NMEKbZyOexL+Qd|HZV+4u-
|
|
92f7d32b
|
2015-09-12T13:46:22
|
|
diff::workdir: ensure ignored files are not returned
Ensure that a diff with the workdir is not erroneously returning
directories.
|
|
d53c8880
|
2015-08-30T19:25:47
|
|
iterator: saner pathlist matching for idx iterator
Some nicer refactoring for index iteration walks.
The index iterator doesn't binary search through the pathlist space,
since it lacks directory entries, and would have to binary search
each index entry and all its parents (eg, when presented with an index
entry of `foo/bar/file.c`, you would have to look in the pathlist for
`foo/bar/file.c`, `foo/bar` and `foo`). Since the index entries and the
pathlist are both nicely sorted, we walk the index entries in lockstep
with the pathlist like we do for other iteration/diff/merge walks.
|
|
4a0dbeb0
|
2015-08-30T17:06:26
|
|
diff: use new iterator pathlist handling
When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`
turn on the faster iterator pathlist handling.
Updates iterator pathspecs to include directory prefixes (eg, `foo/`)
for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.
|
|
3273ab3f
|
2015-08-28T20:06:18
|
|
diff: better document GIT_DIFF_PATHSPEC_DISABLE
Document that `GIT_DIFF_PATHSPEC_DISABLE` is not necessarily about
explicit path matching, but also includes matching of directory
names. Enforce this in a test.
|
|
ed1c6446
|
2015-07-28T11:41:27
|
|
iterator: use an options struct instead of args
|
|
e451cd5c
|
2015-08-15T18:46:38
|
|
diff: don't error out on an invalid regex
When parsing user-provided regex patterns for functions, we must not
fail to provide a diff just because a pattern is not well
formed. Ignore it instead.
|
|
ccef5adb
|
2015-06-30T09:30:20
|
|
Added git_diff_index_to_index()
|
|
fa399750
|
2015-06-27T21:26:27
|
|
Merge pull request #3265 from libgit2/leaks
Plug a bunch of leaks
|
|
9568660f
|
2015-06-26T18:31:39
|
|
diff: fix leaks in diff printing
|
|
cfafeb84
|
2015-06-26T18:11:05
|
|
Merge pull request #3263 from git-up/fixes
Fixes
|
|
492851c9
|
2015-06-26T08:18:06
|
|
Removed unused variables
|
|
13e5e344
|
2015-06-26T16:52:26
|
|
test-diff-blob: Pass proper nibble sizes
|
|
619423f2
|
2015-06-19T11:11:12
|
|
diff: test we don't update index unnecessarily
Test that workdir diffs, when presented with UPDATE_INDEX, only
write the index when they actually make a change.
|
|
c2418f46
|
2015-06-25T12:48:44
|
|
Rename FALLBACK to UNSPECIFIED
Fallback describes the mechanism, while unspecified explains what the
user is thinking.
|
|
daacf96d
|
2015-06-24T23:34:40
|
|
Merge pull request #3097 from libgit2/cmn/submodule-config-state
Remove run-time configuration settings from submodules
|
|
ba8fb7c4
|
2015-06-24T11:39:59
|
|
diff::binary tests: empty diff when forced binary
Ensure that even when we're forcing a binary diff that we do not
assume that there *is* a diff. There should be an empty diff for
no change.
|
|
76633215
|
2015-06-24T14:25:36
|
|
binary diff: test that the diff and patch otputs are the same
We test the generation of the textual patch via the patch function,
which are just one of two possibilities to get the output.
Add a second patch generation via the diff function to make sure both
outputs are in sync.
|
|
cc605e73
|
2015-06-23T23:52:03
|
|
Merge pull request #3222 from git-up/conflicted
Fixed GIT_DELTA_CONFLICTED not returned in some cases
|
|
bd670abd
|
2015-06-23T23:30:58
|
|
Merge pull request #3226 from libgit2/cmn/racy-diff-again
racy-git, the missing link
|