diff options
author | Elijah Newren <newren@gmail.com> | 2021-05-12 20:28:20 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-05-13 02:45:03 +0300 |
commit | dd55fc0df15c338a8dbec6dec6ca6b58edc8acef (patch) | |
tree | 59eba3ec0924940c5c68e54c6a1820022edc0833 /t/t3001-ls-files-others-exclude.sh | |
parent | aa6e1b21e5de8fae7121b8c6543e1482144c1ed3 (diff) |
dir: traverse into untracked directories if they may have ignored subfiles
A directory that is untracked does not imply that all files under it
should be categorized as untracked; in particular, if the caller is
interested in ignored files, many files or directories underneath the
untracked directory may be ignored. We previously partially handled
this right with DIR_SHOW_IGNORED_TOO, but missed DIR_SHOW_IGNORED. It
was not obvious, though, because the logic for untracked and excluded
files had been fused together making it harder to reason about. The
previous commit split that logic out, making it easier to notice that
DIR_SHOW_IGNORED was missing. Add it.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-x | t/t3001-ls-files-others-exclude.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index ac05d1a179..516c95ea0e 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@ -292,7 +292,7 @@ EOF test_cmp expect actual ' -test_expect_failure 'ls-files with "**" patterns and --directory' ' +test_expect_success 'ls-files with "**" patterns and --directory' ' # Expectation same as previous test git ls-files --directory -o -i --exclude "**/a.1" >actual && test_cmp expect actual |