From d4b747c1cb72119d783154f88640920d3a3fdb3d Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Thu, 21 Feb 2013 16:44:44 -0800 Subject: 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). --- src/diff_tform.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/diff_tform.c') 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); -- cgit v1.2.1