1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 22:06:15 +02:00

Merge branch 'mt/checkout-entry-dead-code-removal'

Code clean-up.

* mt/checkout-entry-dead-code-removal:
  checkout_entry(): remove unreachable error() call
This commit is contained in:
Junio C Hamano 2020-08-24 14:54:32 -07:00
commit 43c80d2703

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