diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-09 17:05:15 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-09 17:05:15 -0700 |
commit | fd500302096b5b4e45d78c14d6ea9a704f556a16 (patch) | |
tree | 8b4d7091d3e78f597d0845711a7401986e912982 /t/t3001-ls-files-others-exclude.sh | |
parent | submodule: remove redundant check for the_index.initialized (diff) | |
parent | dir.c: fix ignore processing within not-ignored directories (diff) | |
download | tgif-fd500302096b5b4e45d78c14d6ea9a704f556a16.tar.xz |
Merge branch 'kb/status-ignored-optim-2' into maint
Fix recent regression of .gitignore files that list !directory to
mark it not-ignored.
* kb/status-ignored-optim-2:
dir.c: fix ignore processing within not-ignored directories
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-x | t/t3001-ls-files-others-exclude.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index 4e3735f0cb..f0421c09c7 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@ -175,6 +175,24 @@ test_expect_success 'negated exclude matches can override previous ones' ' grep "^a.1" output ' +test_expect_success 'excluded directory overrides content patterns' ' + + git ls-files --others --exclude="one" --exclude="!one/a.1" >output && + if grep "^one/a.1" output + then + false + fi +' + +test_expect_success 'negated directory doesn'\''t affect content patterns' ' + + git ls-files --others --exclude="!one" --exclude="one/a.1" >output && + if grep "^one/a.1" output + then + false + fi +' + test_expect_success 'subdirectory ignore (setup)' ' mkdir -p top/l1/l2 && ( |