From: Elijah Newren Date: Sun, 10 Apr 2016 06:13:35 +0000 (-0700) Subject: merge-recursive: remove duplicate code X-Git-Tag: v2.9.0-rc0~82^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3efc61add5c5656f0d74cde2b0ff07dd6acb6784;p=thirdparty%2Fgit.git merge-recursive: remove duplicate code In commit 51931bf (merge-recursive: Improve handling of rename target vs. directory addition, 2011-08-11), I apparently added two lines of code that were immediately duplicated a few lines later. No idea why, other than it seems pretty clear this was a mistake: there is no need to remove the same file twice; removing it once is sufficient...especially since the intervening line was working with a different file entirely. Signed-off-by: Elijah Newren Reviewed-by: Junio C Hamano Signed-off-by: Junio C Hamano --- diff --git a/merge-recursive.c b/merge-recursive.c index b880ae50e7..d4292deb5e 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1773,8 +1773,6 @@ static int process_entry(struct merge_options *o, output(o, 1, _("CONFLICT (%s): There is a directory with name %s in %s. " "Adding %s as %s"), conf, path, other_branch, path, new_path); - if (o->call_depth) - remove_file_from_cache(path); update_file(o, 0, sha, mode, new_path); if (o->call_depth) remove_file_from_cache(path);