summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2011-08-11 23:19:55 -0600
committerJunio C Hamano <gitster@pobox.com>2011-08-14 14:19:34 -0700
commit7b1c610f84a46fa237627b3307707afb520e555c (patch)
tree3487f1b4b6f8cf255dd934e22d1590eaef3435b9 /merge-recursive.c
parent0b30e8125130a78bc7c0e13e7f45ba105bd206b8 (diff)
downloadgit-7b1c610f84a46fa237627b3307707afb520e555c.tar.gz
merge-recursive: Fix recursive case with D/F conflict via add/add conflict
When a D/F conflict is introduced via an add/add conflict, when o->call_depth > 0 we need to ensure that the higher stage entry from the base stage is removed. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index e6a6a81ec2..418246376b 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1466,6 +1466,8 @@ static int process_df_entry(struct merge_options *o,
"Adding %s as %s",
conf, path, other_branch, path, new_path);
update_file(o, 0, sha, mode, new_path);
+ if (o->call_depth)
+ remove_file_from_cache(path);
free(new_path);
} else {
output(o, 2, "Adding %s", path);