t3011: demonstrate directory traversal failures
commit452efd11fbf607ad12854edf1488112a7e4790d2
authorElijah Newren <newren@gmail.com>
Tue, 10 Dec 2019 20:00:20 +0000 (10 20:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Dec 2019 20:23:23 +0000 (11 12:23 -0800)
tree35f85584f0f2de60e82b70c30236c92bf3bba1b5
parentda72936f544fec5a335e66432610e4cef4430991
t3011: demonstrate directory traversal failures

Add several tests demonstrating directory traversal failures of various
sorts in dir.c (and one similar looking test that turns out to be a
git_fnmatch bug).  A lot of these tests look like near duplicates of
each other, but an optimization path in dir.c to pre-descend into a
common prefix and the specialized treatment of trailing slashes in dir.c
mean the tiny differences are sometimes important and potentially cause
different codepaths to be explored.

Of the 7 failing tests, 2 are new to git-2.24.0 (tweaked by side effects
of the en/clean-nested-with-ignored-topic); the other 5 also failed
under git-2.23.0 and earlier.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3011-common-prefixes-and-directory-traversal.sh [new file with mode: 0755]