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.
1 files changed, 3 insertions(+), 1 deletions(-) | |||
---|---|---|---|
M | stagit.c | +3 | -1 |
1@@ -122,7 +122,9 @@ commitinfo_getstats(struct commitinfo *ci)
2
3 if (git_diff_find_init_options(&fopts, GIT_DIFF_FIND_OPTIONS_VERSION))
4 goto err;
5- fopts.flags |= GIT_DIFF_FIND_RENAMES | GIT_DIFF_FIND_COPIES;
6+ /* find renames and copies, exact matches (no heuristic) for renames. */
7+ fopts.flags |= GIT_DIFF_FIND_RENAMES | GIT_DIFF_FIND_COPIES |
8+ GIT_DIFF_FIND_EXACT_MATCH_ONLY;
9 if (git_diff_find_similar(ci->diff, &fopts))
10 goto err;
11