summaryrefslogtreecommitdiff
path: root/entry.c
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2020-08-18 17:46:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-08-18 20:26:10 (GMT)
commit748f733d542c8cca1013c1b0901cd96977a7ea11 (patch)
tree4d75353fd4d24140b297b704425a0e6b27dc24c0 /entry.c
parent47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc (diff)
downloadgit-748f733d542c8cca1013c1b0901cd96977a7ea11.zip
git-748f733d542c8cca1013c1b0901cd96977a7ea11.tar.gz
git-748f733d542c8cca1013c1b0901cd96977a7ea11.tar.bz2
checkout_entry(): remove unreachable error() call
This if statement never evaluates to true since we already check state->force a few lines above, and immediately return when it is false. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'entry.c')
-rw-r--r--entry.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/entry.c b/entry.c
index 449bd32..a0532f1 100644
--- a/entry.c
+++ b/entry.c
@@ -510,8 +510,6 @@ int checkout_entry(struct cache_entry *ce, const struct checkout *state,
/* If it is a gitlink, leave it alone! */
if (S_ISGITLINK(ce->ce_mode))
return 0;
- if (!state->force)
- return error("%s is a directory", path.buf);
remove_subtree(&path);
} else if (unlink(path.buf))
return error_errno("unable to unlink old '%s'", path.buf);