]> git.ipfire.org Git - thirdparty/git.git/commit - read-cache.c
read-cache: let verify_path() reject trailing dir separators again
authorRené Scharfe <l.s.r@web.de>
Thu, 7 Oct 2021 20:31:58 +0000 (22:31 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Oct 2021 00:52:26 +0000 (17:52 -0700)
commitc8ad9d04c6a51cb5c73ebc9e42b627314eeafe2f
tree8e664cc06c40a89b5b86c05c0eeabdcf49385f9d
parent2a1ae649a4c485b833d75cd5bb14b53ff9bae2c6
read-cache: let verify_path() reject trailing dir separators again

6e773527b6 (sparse-index: convert from full to sparse, 2021-03-30) made
verify_path() accept trailing directory separators for directories,
which is necessary for sparse directory entries.  This clemency causes
"git stash" to stumble over sub-repositories, though, and there may be
more unintended side-effects.

Avoid them by restoring the old verify_path() behavior and accepting
trailing directory separators only in places that are supposed to handle
sparse directory entries.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c
t/t3905-stash-include-untracked.sh