summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-08-24 14:54:32 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-08-24 14:54:32 -0700
commit43c80d270387458cbf891bd8b3b81d4b14f397dd (patch)
tree2aa1f4924834584513d05f4538afb2c46e3947d4
parentMerge branch 'jc/no-update-fetch-head' (diff)
parentcheckout_entry(): remove unreachable error() call (diff)
downloadtgif-43c80d270387458cbf891bd8b3b81d4b14f397dd.tar.xz
Merge branch 'mt/checkout-entry-dead-code-removal'
Code clean-up. * mt/checkout-entry-dead-code-removal: checkout_entry(): remove unreachable error() call
-rw-r--r--entry.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/entry.c b/entry.c
index 449bd32dee..a0532f1f00 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);