t7061: status --ignored should search untracked dirs
Per eb8c5b87, `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 eb8c5b87 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>
Samuel Lijin committed
May 18, 2017 at 04:21 UTC
0a81d4a55917514091727696a09ac649d03b57ff
1 file changed
+3
-2
t/t7061-wtstatus-ignore.sh
+3
-2
@@ -9,9 +9,10 @@ cat >expected <<\EOF
9
?? actual
10
?? expected
11
?? untracked/
12
+!! untracked/ignored
13
EOF
14
14
-test_expect_success 'status untracked directory with --ignored' '
15
+test_expect_failure 'status untracked directory with --ignored' '
16
echo "ignored" >.gitignore &&
17
mkdir untracked &&
18
: >untracked/ignored &&
@@ -20,7 +21,7 @@ test_expect_success 'status untracked directory with --ignored' '
21
test_cmp expected actual
22
'
23
23
-test_expect_success 'same with gitignore starting with BOM' '
24
+test_expect_failure 'same with gitignore starting with BOM' '
25
printf "\357\273\277ignored\n" >.gitignore &&
26
mkdir -p untracked &&
27
: >untracked/ignored &&