summaryrefslogtreecommitdiff
path: root/t/t4211/sha1/expect.multiple
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2021-11-02 10:40:06 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-11-03 10:10:36 -0700
commit5ceb663e926bd22248d1d72d70fa701c558587ea (patch)
tree51c8c25d8fedec667a758da720b4d710f0038aec /t/t4211/sha1/expect.multiple
parentadvice: update message to suggest '--sparse' (diff)
downloadtgif-5ceb663e926bd22248d1d72d70fa701c558587ea.tar.xz
dir: fix directory-matching bug
This reverts the change from ed49584 (dir: fix pattern matching on dirs, 2021-09-24), which claimed to fix a directory-matching problem without a test case. It turns out to _create_ a bug, but it is a bit subtle. The bug would have been revealed by the first of two tests being added to t0008-ignores.sh. The first uses a pattern "/git/" inside the a/.gitignores file, which matches against 'a/git/foo' but not 'a/git-foo/bar'. This test would fail before the revert. The second test shows what happens if the test instead uses a pattern "git/" and this test passes both before and after the revert. The difference in these two cases are due to how last_matching_pattern_from_list() checks patterns both if they have the PATTERN_FLAG_MUSTBEDIR and PATTERN_FLAG_NODIR flags. In the case of "git/", the PATTERN_FLAG_NODIR is also provided, making the change in behavior in match_pathname() not affect the end result of last_matching_pattern_from_list(). Reported-by: Glen Choo <chooglen@google.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4211/sha1/expect.multiple')
0 files changed, 0 insertions, 0 deletions