diff options
author | Samuel Lijin <sxlijin@gmail.com> | 2017-05-18 04:21:50 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-22 12:06:52 +0900 |
commit | 0a81d4a55917514091727696a09ac649d03b57ff (patch) | |
tree | dc226c147c470fb2719634fa63456396e38f5aeb | |
parent | t7300: clean -d should skip dirs with ignored files (diff) | |
download | tgif-0a81d4a55917514091727696a09ac649d03b57ff.tar.xz |
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>
-rwxr-xr-x | t/t7061-wtstatus-ignore.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t7061-wtstatus-ignore.sh b/t/t7061-wtstatus-ignore.sh index cdc0747bf0..15e7592b6b 100755 --- a/t/t7061-wtstatus-ignore.sh +++ b/t/t7061-wtstatus-ignore.sh @@ -9,9 +9,10 @@ cat >expected <<\EOF ?? actual ?? expected ?? untracked/ +!! untracked/ignored EOF -test_expect_success 'status untracked directory with --ignored' ' +test_expect_failure 'status untracked directory with --ignored' ' echo "ignored" >.gitignore && mkdir untracked && : >untracked/ignored && @@ -20,7 +21,7 @@ test_expect_success 'status untracked directory with --ignored' ' test_cmp expected actual ' -test_expect_success 'same with gitignore starting with BOM' ' +test_expect_failure 'same with gitignore starting with BOM' ' printf "\357\273\277ignored\n" >.gitignore && mkdir -p untracked && : >untracked/ignored && |