summaryrefslogtreecommitdiff
path: root/entry.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-30 21:35:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-30 21:35:36 (GMT)
commit9210c68d2af84d869f1635efe9a2092578653297 (patch)
tree3967574291f29eca2c480266658e2d4185370d66 /entry.c
parent84d06cdc06389ae7c462434cb7b1db0980f63860 (diff)
parentfab78a0c3defddff87ea5aa7dd32c5e444c43f1f (diff)
downloadgit-9210c68d2af84d869f1635efe9a2092578653297.zip
git-9210c68d2af84d869f1635efe9a2092578653297.tar.gz
git-9210c68d2af84d869f1635efe9a2092578653297.tar.bz2
Merge branch 'mt/checkout-remove-nofollow'
When "git checkout" removes a path that does not exist in the commit it is checking out, it wasn't careful enough not to follow symbolic links, which has been corrected. * mt/checkout-remove-nofollow: checkout: don't follow symlinks when removing entries symlinks: update comment on threaded_check_leading_path()
Diffstat (limited to 'entry.c')
-rw-r--r--entry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/entry.c b/entry.c
index 7b9f437..33ce80c 100644
--- a/entry.c
+++ b/entry.c
@@ -530,7 +530,7 @@ void unlink_entry(const struct cache_entry *ce)
submodule_move_head(ce->name, "HEAD", NULL,
SUBMODULE_MOVE_HEAD_FORCE);
}
- if (!check_leading_path(ce->name, ce_namelen(ce)))
+ if (check_leading_path(ce->name, ce_namelen(ce), 1) >= 0)
return;
if (remove_or_warn(ce->ce_mode, ce->name))
return;