summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-12-22 23:10:20 +0100
committerJunio C Hamano <gitster@pobox.com>2008-12-24 23:06:48 -0800
commit36e3b5eafe967cb721f5e2bbaa396f979b8ebd7c (patch)
tree91adeb02422aeb2b69418c9d3ca23ed9e14a7dfa /merge-recursive.c
parent8104ebfe8276657ee803cca7eb8665a78cf3ef83 (diff)
downloadgit-36e3b5eafe967cb721f5e2bbaa396f979b8ebd7c.tar.gz
merge-recursive: mark rename/delete conflict as unmerged
When a file was renamed in one branch, but deleted in the other, one should expect the index to contain an unmerged entry, namely the target of the rename. Make it so. Noticed by Constantine Plotnikov. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index a0c804c817..69e7152204 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -902,6 +902,11 @@ static int process_renames(struct merge_options *o,
ren1_src, ren1_dst, branch1,
branch2);
update_file(o, 0, ren1->pair->two->sha1, ren1->pair->two->mode, ren1_dst);
+ update_stages(ren1_dst, NULL,
+ branch1 == o->branch1 ?
+ ren1->pair->two : NULL,
+ branch1 == o->branch1 ?
+ NULL : ren1->pair->two, 1);
} else if (!sha_eq(dst_other.sha1, null_sha1)) {
const char *new_path;
clean_merge = 0;