diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-02-27 10:33:56 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-27 10:33:56 -0800 |
commit | 796a788a1c1a2f6a93763312a840d7ed67a8e32f (patch) | |
tree | 6cdb37210290324be042c9aa63c62313e3abe52b /t | |
parent | Merge branch 'rj/sparse-updates' (diff) | |
parent | check-ignore: fix mix of directories and other file types (diff) | |
download | tgif-796a788a1c1a2f6a93763312a840d7ed67a8e32f.tar.xz |
Merge branch 'rs/check-ignore-multi'
"git check-ignore" with multiple paths got confused when one is a
file and the other is a directory, which has been fixed.
* rs/check-ignore-multi:
check-ignore: fix mix of directories and other file types
Diffstat (limited to 't')
-rwxr-xr-x | t/t0008-ignores.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh index d27f438bf4..54a4703ef1 100755 --- a/t/t0008-ignores.sh +++ b/t/t0008-ignores.sh @@ -775,6 +775,26 @@ test_expect_success PIPE 'streaming support for --stdin' ' echo "$response" | grep "^:: two" ' +test_expect_success 'existing file and directory' ' + test_when_finished "rm one" && + test_when_finished "rmdir top-level-dir" && + >one && + mkdir top-level-dir && + git check-ignore one top-level-dir >actual && + grep one actual && + grep top-level-dir actual +' + +test_expect_success 'existing directory and file' ' + test_when_finished "rm one" && + test_when_finished "rmdir top-level-dir" && + >one && + mkdir top-level-dir && + git check-ignore top-level-dir one >actual && + grep one actual && + grep top-level-dir actual +' + ############################################################################ # # test whitespace handling |