diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-07-30 13:20:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-30 13:20:36 -0700 |
commit | 82fafc77bac9b3294b3e67bc021eeb511137c0f7 (patch) | |
tree | 37ba8bd8b3b0486ded2c34584cc8ddc410ff2f0b /t | |
parent | Merge branch 'ct/mv-unmerged-path-error' into master (diff) | |
parent | dir: check pathspecs before returning `path_excluded` (diff) | |
download | tgif-82fafc77bac9b3294b3e67bc021eeb511137c0f7.tar.xz |
Merge branch 'en/fill-directory-exponential' into master
Fix to a regression introduced during 2.27 cycle.
* en/fill-directory-exponential:
dir: check pathspecs before returning `path_excluded`
Diffstat (limited to 't')
-rwxr-xr-x | t/t7061-wtstatus-ignore.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t7061-wtstatus-ignore.sh b/t/t7061-wtstatus-ignore.sh index e4cf5484f9..2f9bea9793 100755 --- a/t/t7061-wtstatus-ignore.sh +++ b/t/t7061-wtstatus-ignore.sh @@ -30,6 +30,31 @@ test_expect_success 'same with gitignore starting with BOM' ' test_cmp expected actual ' +test_expect_success 'status untracked files --ignored with pathspec (no match)' ' + git status --porcelain --ignored -- untracked/i >actual && + test_must_be_empty actual && + git status --porcelain --ignored -- untracked/u >actual && + test_must_be_empty actual +' + +test_expect_success 'status untracked files --ignored with pathspec (literal match)' ' + git status --porcelain --ignored -- untracked/ignored >actual && + echo "!! untracked/ignored" >expected && + test_cmp expected actual && + git status --porcelain --ignored -- untracked/uncommitted >actual && + echo "?? untracked/uncommitted" >expected && + test_cmp expected actual +' + +test_expect_success 'status untracked files --ignored with pathspec (glob match)' ' + git status --porcelain --ignored -- untracked/i\* >actual && + echo "!! untracked/ignored" >expected && + test_cmp expected actual && + git status --porcelain --ignored -- untracked/u\* >actual && + echo "?? untracked/uncommitted" >expected && + test_cmp expected actual +' + cat >expected <<\EOF ?? .gitignore ?? actual |