diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-01-07 12:44:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-01-07 12:44:42 -0800 |
commit | f41157e649615ada01f175d00f9bd8c9ea507bca (patch) | |
tree | 0c6afd1da029f0ae2697954576058f7d2de53ca2 /diffcore-break.c | |
parent | Merge branch 'jc/clone-borrow' (diff) | |
parent | diff -B -M: fix output for "copy and then rewrite" case (diff) | |
download | tgif-f41157e649615ada01f175d00f9bd8c9ea507bca.tar.xz |
Merge branch 'jc/diff-b-m'
Fix long-standing bug in "diff -B -M" output.
* jc/diff-b-m:
diff -B -M: fix output for "copy and then rewrite" case
Diffstat (limited to 'diffcore-break.c')
-rw-r--r-- | diffcore-break.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/diffcore-break.c b/diffcore-break.c index 1d9e530a84..5473493e10 100644 --- a/diffcore-break.c +++ b/diffcore-break.c @@ -246,6 +246,13 @@ static void merge_broken(struct diff_filepair *p, dp = diff_queue(outq, d->one, c->two); dp->score = p->score; + /* + * We will be one extra user of the same src side of the + * broken pair, if it was used as the rename source for other + * paths elsewhere. Increment to mark that the path stays + * in the resulting tree. + */ + d->one->rename_used++; diff_free_filespec_data(d->two); diff_free_filespec_data(c->one); free(d); |