Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-02-15 12:03:39 +0300
committerJunio C Hamano <gitster@pobox.com>2016-02-16 02:32:33 +0300
commitd589a67eceacd1cc171bbe94906ca7c9a0edd8c5 (patch)
treefa380845f615c5f0742f6ff61bd20befbf06db77 /t/t3001-ls-files-others-exclude.sh
parentc62a91736a6dcd909167cf9fbb751d65c85482dd (diff)
dir.c: don't exclude whole dir prematurely
If there is a pattern "!foo/bar", this patch makes it not exclude "foo" right away. This gives us a chance to examine "foo" and re-include "foo/bar". Helped-by: brian m. carlson <sandals@crustytoothpaste.net> Helped-by: Micha Wiedenmann <mw-u2@gmx.de> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
index 3fc484e8c3..d043078da5 100755
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -175,13 +175,10 @@ test_expect_success 'negated exclude matches can override previous ones' '
grep "^a.1" output
'
-test_expect_success 'excluded directory overrides content patterns' '
+test_expect_success 'excluded directory does not override content patterns' '
git ls-files --others --exclude="one" --exclude="!one/a.1" >output &&
- if grep "^one/a.1" output
- then
- false
- fi
+ grep "^one/a.1" output
'
test_expect_success 'negated directory doesn'\''t affect content patterns' '