diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2013-08-21 14:07:53 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2013-08-28 08:30:19 -0500 |
| commit | 17c7fbf6d276443344c54f55800367b9837c0259 (patch) | |
| tree | 97aeafdfa0eca4736a4f0cd733250f5d150278e8 /src/diff_tform.c | |
| parent | 1ef05e3f0ea8fa8db2167307101c8c43d1c1784b (diff) | |
| download | libgit2-17c7fbf6d276443344c54f55800367b9837c0259.tar.gz | |
Split rewrites, status doesn't return rewrites
Ensure that we apply splits to rewrites, even if we're not
interested in examining it closely for rename/copy detection.
In keeping with core git, status should not display rewrites,
it should simply show files as "modified".
Diffstat (limited to 'src/diff_tform.c')
| -rw-r--r-- | src/diff_tform.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/diff_tform.c b/src/diff_tform.c index ba35d3c14..ca3c77187 100644 --- a/src/diff_tform.c +++ b/src/diff_tform.c @@ -799,6 +799,9 @@ int git_diff_find_similar( if (is_rename_target(diff, &opts, t, sigcache)) ++num_tgts; + + if ((tgt->flags & GIT_DIFF_FLAG__TO_SPLIT) != 0) + num_rewrites++; } /* if there are no candidate srcs or tgts, we're done */ @@ -1036,7 +1039,8 @@ find_best_matches: if (num_rewrites > 0 || num_updates > 0) error = apply_splits_and_deletes( diff, diff->deltas.length - num_rewrites, - FLAG_SET(&opts, GIT_DIFF_BREAK_REWRITES)); + FLAG_SET(&opts, GIT_DIFF_BREAK_REWRITES) && + !FLAG_SET(&opts, GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY)); cleanup: git__free(tgt2src); |
