diff options
author | Russell Belfer <rb@github.com> | 2013-02-22 04:44:44 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-02-22 04:44:44 +0400 |
commit | d4b747c1cb72119d783154f88640920d3a3fdb3d (patch) | |
tree | 81b72f14e2a36850226bc6343f92cefeeea4ed83 /src/diff_tform.c | |
parent | 960a04dd56d89e94b5092be19ba9704b2d292dba (diff) |
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 'src/diff_tform.c')
-rw-r--r-- | src/diff_tform.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/diff_tform.c b/src/diff_tform.c index 48332d3e5..ae0fd36d6 100644 --- a/src/diff_tform.c +++ b/src/diff_tform.c @@ -561,8 +561,6 @@ int git_diff_find_similar( /* next rewrite the diffs with renames / copies */ - num_rewrites = 0; - git_vector_foreach(&diff->deltas, j, to) { if (!matches[j]) { assert(to->similarity == 0); |