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>
This commit is contained in:
Elijah Newren
2011-08-11 23:19:55 -06:00
committed by Junio C Hamano
parent 0b30e81251
commit 7b1c610f84
2 changed files with 4 additions and 2 deletions

View File

@ -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);