aboutsummaryrefslogtreecommitdiffstats
path: root/stagit.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <[email protected]>2018-11-18 18:07:22 +0100
committerHiltjo Posthuma <[email protected]>2018-11-18 18:07:22 +0100
commit608593b0f875012875f13d28fbccd533d1266fd2 (patch)
tree948cca8be8b66d0d299b507f30cafd482dc947be /stagit.c
parentc100c3cc30dd948c881abd96720ca4fb2ddbb82f (diff)
downloadstagit-608593b0f875012875f13d28fbccd533d1266fd2.tar.gz
stagit-608593b0f875012875f13d28fbccd533d1266fd2.zip
don't use a heuristic for renames, the content must match exactly
this prevents showing files as renames when most (but not all) of the file was changed.
Diffstat (limited to 'stagit.c')
-rw-r--r--stagit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stagit.c b/stagit.c
index 8a7e7fc..b2741c0 100644
--- a/stagit.c
+++ b/stagit.c
@@ -122,7 +122,9 @@ commitinfo_getstats(struct commitinfo *ci)
if (git_diff_find_init_options(&fopts, GIT_DIFF_FIND_OPTIONS_VERSION))
goto err;
- fopts.flags |= GIT_DIFF_FIND_RENAMES | GIT_DIFF_FIND_COPIES;
+ /* find renames and copies, exact matches (no heuristic) for renames. */
+ fopts.flags |= GIT_DIFF_FIND_RENAMES | GIT_DIFF_FIND_COPIES |
+ GIT_DIFF_FIND_EXACT_MATCH_ONLY;
if (git_diff_find_similar(ci->diff, &fopts))
goto err;