summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-05-20 13:37:21 -0700
committerRussell Belfer <rb@github.com>2013-05-20 13:37:21 -0700
commit9be5be47fb1d9bc08e25b30c05dbf48739710062 (patch)
tree7543170535a1260f24c27696c361e58ae19de17c /include/git2/diff.h
parent5c8f37a397609eba92c6a906be467a7d7373e4f3 (diff)
downloadlibgit2-9be5be47fb1d9bc08e25b30c05dbf48739710062.tar.gz
More git_diff_find_similar improvements
- Add new GIT_DIFF_FIND_EXACT_MATCH_ONLY flag to do similarity matching without using the similarity metric (i.e. only compare the SHA). - Clean up the similarity measurement code to more rigorously distinguish between files that are not similar and files that are not comparable (previously, a 0 could either mean that the files could not be compared or that they were totally different) - When splitting a MODIFIED file into a DELETE/ADD pair, actually make a DELETED/UNTRACKED pair if the right side of the diff is from the working directory. This prevents an odd mix of ADDED and UNTRACKED files on workdir diffs.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index 172aa118b..31f6e0591 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -441,6 +441,8 @@ typedef enum {
GIT_DIFF_FIND_IGNORE_WHITESPACE = (1 << 12),
/** measure similarity including all data */
GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE = (1 << 13),
+ /** measure similarity only by comparing SHAs (fast and cheap) */
+ GIT_DIFF_FIND_EXACT_MATCH_ONLY = (1 << 14),
} git_diff_find_t;
/**