diff options
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r-- | diffcore-rename.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c index 0afe903de9..361eed9fbc 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -467,8 +467,12 @@ void diffcore_rename(struct diff_options *options) else if (!DIFF_OPT_TST(options, RENAME_EMPTY) && is_empty_blob_sha1(p->two->sha1)) continue; - else - add_rename_dst(p->two); + else if (add_rename_dst(p->two) < 0) { + warning("skipping rename detection, detected" + " duplicate destination '%s'", + p->two->path); + goto cleanup; + } } else if (!DIFF_OPT_TST(options, RENAME_EMPTY) && is_empty_blob_sha1(p->one->sha1)) |