aboutsummaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-09-15 12:39:12 -0700
committerJunio C Hamano <gitster@pobox.com>2010-09-15 12:39:12 -0700
commit9f0ccb5b0ac067b3408d3776bb06f85acd4a1e7e (patch)
tree6e3056f75553bb79e27b0364f83aca2e906d672c /merge-recursive.c
parent12644fa99fd16c33379c885670be0963cec07fc1 (diff)
parentd5af51053cd060d7a4893f030626b04351554d1b (diff)
downloadgit-9f0ccb5b0ac067b3408d3776bb06f85acd4a1e7e.tar.gz
git-9f0ccb5b0ac067b3408d3776bb06f85acd4a1e7e.tar.xz
Merge branch 'ks/recursive-rename-add-identical'
* ks/recursive-rename-add-identical: RE: [PATCH] Avoid rename/add conflict when contents are identical
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 20e177942..c57469881 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -955,6 +955,12 @@ static int process_renames(struct merge_options *o,
ren1->pair->two : NULL,
branch1 == o->branch1 ?
NULL : ren1->pair->two, 1);
+ } else if ((dst_other.mode == ren1->pair->two->mode) &&
+ sha_eq(dst_other.sha1, ren1->pair->two->sha1)) {
+ /* Added file on the other side
+ identical to the file being
+ renamed: clean merge */
+ update_file(o, 1, ren1->pair->two->sha1, ren1->pair->two->mode, ren1_dst);
} else if (!sha_eq(dst_other.sha1, null_sha1)) {
const char *new_path;
clean_merge = 0;