Skip to content

Commit 0a81d4a

Browse files
Samuel Lijingitster
authored andcommitted
t7061: status --ignored should search untracked dirs
Per eb8c5b8, `status --ignored` by design does not list ignored files if they are in a directory which contains only ignored and untracked files (which is itself considered to be untracked) without `-uall`. This does not make sense for `--ignored`, which claims to "Show ignored files as well." Thus we revisit eb8c5b8 and decide that for such directories, `status --ignored` will list the directory as untracked *and* list all ignored files within said directory even without `-uall`. Signed-off-by: Samuel Lijin <sxlijin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent b3487cc commit 0a81d4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t7061-wtstatus-ignore.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ cat >expected <<\EOF
99
?? actual
1010
?? expected
1111
?? untracked/
12+
!! untracked/ignored
1213
EOF
1314

14-
test_expect_success 'status untracked directory with --ignored' '
15+
test_expect_failure 'status untracked directory with --ignored' '
1516
echo "ignored" >.gitignore &&
1617
mkdir untracked &&
1718
: >untracked/ignored &&
@@ -20,7 +21,7 @@ test_expect_success 'status untracked directory with --ignored' '
2021
test_cmp expected actual
2122
'
2223

23-
test_expect_success 'same with gitignore starting with BOM' '
24+
test_expect_failure 'same with gitignore starting with BOM' '
2425
printf "\357\273\277ignored\n" >.gitignore &&
2526
mkdir -p untracked &&
2627
: >untracked/ignored &&

0 commit comments

Comments
 (0)