X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diffcore-rename.c;h=f639601c762ebbd12374fa739d1d63efaf265e2a;hb=284daf29026c519729747bd2051829f0f958473c;hp=3d65bb370dbfd6d6581b6b3b454b5551d3e3fe22;hpb=5ae6f5ca2f70bd7d5ca88c20f2be62bf3844af73;p=git.git diff --git a/diffcore-rename.c b/diffcore-rename.c index 3d65bb370..f639601c7 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -515,7 +515,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, @@ -631,7 +631,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 *