X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diffcore-rename.c;h=0b9e99a04ee62d0d14900888f5b8b9ab3d957b5f;hb=4bbfd8e3da6d5fde8f1e98900523996fd138d9fc;hp=d40e40a3ac9c919475d6157464fa906e37b0dd80;hpb=be44a20aa88b196b769dd894c0ac7a9ff5a7a1f6;p=git.git diff --git a/diffcore-rename.c b/diffcore-rename.c index d40e40a3a..0b9e99a04 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -466,7 +466,7 @@ void diffcore_rename(struct diff_options *options) else locate_rename_dst(p->two, 1); } - else if (!DIFF_FILE_VALID(p->two)) { + else if (!DIFF_PAIR_UNMERGED(p) && !DIFF_FILE_VALID(p->two)) { /* * If the source is a broken "delete", and * they did not really want to get broken, @@ -586,7 +586,10 @@ void diffcore_rename(struct diff_options *options) struct diff_filepair *p = q->queue[i]; struct diff_filepair *pair_to_free = NULL; - if (!DIFF_FILE_VALID(p->one) && DIFF_FILE_VALID(p->two)) { + if (DIFF_PAIR_UNMERGED(p)) { + diff_q(&outq, p); + } + else if (!DIFF_FILE_VALID(p->one) && DIFF_FILE_VALID(p->two)) { /* * Creation *