diff options
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-x | t/t3001-ls-files-others-exclude.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index 4e3735f0cb..b2798feef7 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@ -115,7 +115,7 @@ EOF git config core.excludesFile excludes-file -git status | grep "^# " > output +git -c status.displayCommentPrefix=true status | grep "^# " > output cat > expect << EOF # .gitignore @@ -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 && ( |