Skip to content

Commit 18c8f42

Browse files
committed
status: verify that --show-ignored-directory prints a warning
The option is deprecated now, and we better make sure that keeps saying so until we finally remove it. Suggested by Kevin Willford. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 1b292ba commit 18c8f42

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/t7520-status-show-ignored-directory.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ test_expect_success 'setup initial commit and ignore file' '
2121
'
2222

2323
cat >expect <<\EOF
24+
? err
2425
? expect
2526
? output
2627
! dir/ignored/ignored_1.ign
@@ -38,8 +39,9 @@ test_expect_success 'setup folder with ignored files' '
3839

3940
test_expect_success 'Verify behavior of status on folders with ignored files' '
4041
test_when_finished "git clean -fdx" &&
41-
git status --porcelain=v2 --ignored --untracked-files=all --show-ignored-directory >output &&
42-
test_i18ncmp expect output
42+
git status --porcelain=v2 --ignored --untracked-files=all --show-ignored-directory >output 2>err &&
43+
test_i18ncmp expect output &&
44+
grep "deprecated.*use --ignored=matching instead" err
4345
'
4446

4547
# Test status bahavior on folder with tracked and ignored files

0 commit comments

Comments
 (0)