summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-02-21 16:44:44 -0800
committerRussell Belfer <rb@github.com>2013-02-21 16:44:44 -0800
commitd4b747c1cb72119d783154f88640920d3a3fdb3d (patch)
tree81b72f14e2a36850226bc6343f92cefeeea4ed83 /include/git2/diff.h
parent960a04dd56d89e94b5092be19ba9704b2d292dba (diff)
downloadlibgit2-d4b747c1cb72119d783154f88640920d3a3fdb3d.tar.gz
Add diff rename tests with partial similarity
This adds some new tests that actually exercise the similarity metric between files to detect renames, copies, and split modified files that are too heavily modified. There is still more testing to do - these tests are just partially covering the cases. There is also one bug fix in this where a change set with only MODIFY being broken into ADD/DELETE (due to low self-similarity) without any additional RENAMED entries would end up not processing the split requests (because the num_rewrites counter got reset).
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index 379f4694e..ca3484332 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -390,6 +390,9 @@ typedef enum {
/** split large rewrites into delete/add pairs (`--break-rewrites=/M`) */
GIT_DIFF_FIND_AND_BREAK_REWRITES = (1 << 4),
+ /** turn on all finding features */
+ GIT_DIFF_FIND_ALL = (0x1f),
+
/** measure similarity ignoring leading whitespace (default) */
GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE = 0,
/** measure similarity ignoring all whitespace */