diff options
author | Russell Belfer <rb@github.com> | 2012-10-23 16:40:51 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-10-23 16:40:51 -0700 |
commit | b4f5bb074721823cc016b66a9984abe2c271cb1f (patch) | |
tree | 946a7522e701442786cdec870a9035f4bde097a4 /tests-clar/diff/diff_helpers.h | |
parent | 5b67d145d8f465ed0c7ed9c07d331aae29c2713b (diff) | |
download | libgit2-b4f5bb074721823cc016b66a9984abe2c271cb1f.tar.gz |
Initial implementation of diff rename detection
This implements the basis for diff rename and copy detection,
although it is based on simple SHA comparison right now instead
of using a matching algortihm. Just as `git_diff_merge` can be
used as a post-pass on diffs to emulate certain command line
behaviors, there is a new API `git_diff_detect` which will
update a diff list in-place, adjusting some deltas to RENAMED
or COPIED state (and also, eventually, splitting MODIFIED deltas
where the change is too large into DELETED/ADDED pairs).
This also adds a new test repo that will hold rename/copy/split
scenarios. Right now, it just has exact-match rename and copy,
but the tests are written to use tree diffs, so we should be able
to add new test scenarios easily without breaking tests.
Diffstat (limited to 'tests-clar/diff/diff_helpers.h')
-rw-r--r-- | tests-clar/diff/diff_helpers.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests-clar/diff/diff_helpers.h b/tests-clar/diff/diff_helpers.h index 629130934..6ff493d49 100644 --- a/tests-clar/diff/diff_helpers.h +++ b/tests-clar/diff/diff_helpers.h @@ -8,12 +8,7 @@ typedef struct { int files; int files_binary; - int file_adds; - int file_dels; - int file_mods; - int file_ignored; - int file_untracked; - int file_unmodified; + int file_status[10]; /* indexed by git_delta_t value */ int hunks; int hunk_new_lines; @@ -23,8 +18,6 @@ typedef struct { int line_ctxt; int line_adds; int line_dels; - - bool at_least_one_of_them_is_binary; } diff_expects; extern int diff_file_fn( |