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>
This commit is contained in:
Matheus Tavares 2020-08-18 14:46:55 -03:00 committed by Junio C Hamano
parent 47ae905ffb
commit 748f733d54
1 changed files with 0 additions and 2 deletions

View File

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