summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Rast <trast@inf.ethz.ch>2014-09-06 19:56:59 +0200
committerJunio C Hamano <gitster@pobox.com>2014-09-08 09:51:48 -0700
commite82016815d43acea8de55f88f6ef8aa98446dad5 (patch)
tree902f4985f7661c1739b86a8f16310b457fc63981
parent85f083786fe37f280ca30fc0b74498b22b322c6d (diff)
downloadgit-e82016815d43acea8de55f88f6ef8aa98446dad5.tar.gz
merge-recursive: remove dead conditional in update_stages()
650467c (merge-recursive: Consolidate different update_stages functions, 2011-08-11) changed the former argument 'clear' to always be true. Remove the useless conditional. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--merge-recursive.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 1d332b8bbb..4459607af3 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -547,11 +547,9 @@ static int update_stages(const char *path, const struct diff_filespec *o,
* would_lose_untracked). Instead, reverse the order of the calls
* (executing update_file first and then update_stages).
*/
- int clear = 1;
int options = ADD_CACHE_OK_TO_ADD | ADD_CACHE_SKIP_DFCHECK;
- if (clear)
- if (remove_file_from_cache(path))
- return -1;
+ if (remove_file_from_cache(path))
+ return -1;
if (o)
if (add_cacheinfo(o->mode, o->sha1, path, 1, 0, options))
return -1;