From: Junio C Hamano Date: Mon, 10 Jun 2013 00:05:15 +0000 (-0700) Subject: Merge branch 'kb/status-ignored-optim-2' into maint X-Git-Tag: v1.8.3.1~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fd500302096b5b4e45d78c14d6ea9a704f556a16?ds=inline;hp=-c 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 --- fd500302096b5b4e45d78c14d6ea9a704f556a16 diff --combined t/t3001-ls-files-others-exclude.sh index 4e3735f0cb,b3814cdb42..f0421c09c7 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@@ -103,7 -103,7 +103,7 @@@ test_expect_success test_cmp expect output' test_expect_success 'restore gitignore' ' - git checkout $allignores && + git checkout --ignore-skip-worktree-bits $allignores && rm .git/index ' @@@ -175,6 -175,24 +175,24 @@@ test_expect_success 'negated exclude ma 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 && (