diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-11-03 23:32:28 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-03 23:32:28 +0300 |
commit | 36f0a2e20f3eeeaef8c356a4c9d27c3a5a5e13d0 (patch) | |
tree | c5afe6636bf307c3b742e7461f076659f5ae55d3 /t/t0008-ignores.sh | |
parent | e2a33ef9e280def6f593b6dc7b9d07421c35b3db (diff) | |
parent | 5ceb663e926bd22248d1d72d70fa701c558587ea (diff) |
Merge branch 'ds/add-rm-with-sparse-index'
Regression fix.
* ds/add-rm-with-sparse-index:
dir: fix directory-matching bug
Diffstat (limited to 't/t0008-ignores.sh')
-rwxr-xr-x | t/t0008-ignores.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh index 532637de88..1889cfc60e 100755 --- a/t/t0008-ignores.sh +++ b/t/t0008-ignores.sh @@ -803,6 +803,32 @@ test_expect_success 'existing directory and file' ' grep top-level-dir actual ' +test_expect_success 'exact prefix matching (with root)' ' + test_when_finished rm -r a && + mkdir -p a/git a/git-foo && + touch a/git/foo a/git-foo/bar && + echo /git/ >a/.gitignore && + git check-ignore a/git a/git/foo a/git-foo a/git-foo/bar >actual && + cat >expect <<-\EOF && + a/git + a/git/foo + EOF + test_cmp expect actual +' + +test_expect_success 'exact prefix matching (without root)' ' + test_when_finished rm -r a && + mkdir -p a/git a/git-foo && + touch a/git/foo a/git-foo/bar && + echo git/ >a/.gitignore && + git check-ignore a/git a/git/foo a/git-foo a/git-foo/bar >actual && + cat >expect <<-\EOF && + a/git + a/git/foo + EOF + test_cmp expect actual +' + ############################################################################ # # test whitespace handling |