aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-18 11:06:15 -0700
committerJunio C Hamano <gitster@pobox.com>2016-03-18 11:06:15 -0700
commit5cee349370bd2dce48d0d653ab4ce99bb79a3415 (patch)
tree382693a846a87b9f1af799a1fdf35b51142757b0 /t
parent8ad3cb08690bdf9a340e47ed4fdb67cbacd1edf2 (diff)
downloadgit-5cee349370bd2dce48d0d653ab4ce99bb79a3415.tar.gz
git-5cee349370bd2dce48d0d653ab4ce99bb79a3415.tar.xz
Revert "Merge branch 'nd/exclusion-regression-fix'"
This reverts commit 5e57f9c3dfe7dd44a1b56bb5b3327d7a1356ec7c, reversing changes made to e79112d21024beb997951381db21a70b087d459d. We will be postponing nd/exclusion-regression-fix topic to later cycle.
Diffstat (limited to 't')
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh7
-rwxr-xr-xt/t3007-ls-files-other-negative.sh153
2 files changed, 5 insertions, 155 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
index d043078da..3fc484e8c 100755
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -175,10 +175,13 @@ test_expect_success 'negated exclude matches can override previous ones' '
grep "^a.1" output
'
-test_expect_success 'excluded directory does not override content patterns' '
+test_expect_success 'excluded directory overrides content patterns' '
git ls-files --others --exclude="one" --exclude="!one/a.1" >output &&
- grep "^one/a.1" output
+ if grep "^one/a.1" output
+ then
+ false
+ fi
'
test_expect_success 'negated directory doesn'\''t affect content patterns' '
diff --git a/t/t3007-ls-files-other-negative.sh b/t/t3007-ls-files-other-negative.sh
deleted file mode 100755
index 0797b86ad..000000000
--- a/t/t3007-ls-files-other-negative.sh
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/bin/sh
-
-test_description='test re-include patterns'
-
-. ./test-lib.sh
-
-test_expect_success 'setup' '
- mkdir -p fooo foo/bar tmp &&
- touch abc foo/def foo/bar/ghi foo/bar/bar
-'
-
-test_expect_success 'no match, do not enter subdir and waste cycles' '
- cat >.gitignore <<-\EOF &&
- /tmp
- /foo
- !fooo/bar/bar
- EOF
- GIT_TRACE_EXCLUDE="$(pwd)/tmp/trace" git ls-files -o --exclude-standard >tmp/actual &&
- ! grep "enter .foo/.\$" tmp/trace &&
- cat >tmp/expected <<-\EOF &&
- .gitignore
- abc
- EOF
- test_cmp tmp/expected tmp/actual
-'
-
-test_expect_success 'match, excluded by literal pathname pattern' '
- cat >.gitignore <<-\EOF &&
- /tmp
- /fooo
- /foo
- !foo/bar/bar
- EOF
- cat >fooo/.gitignore <<-\EOF &&
- !/*
- EOF git ls-files -o --exclude-standard >tmp/actual &&
- cat >tmp/expected <<-\EOF &&
- .gitignore
- abc
- foo/bar/bar
- EOF
- test_cmp tmp/expected tmp/actual
-'
-
-test_expect_success 'match, excluded by wildcard pathname pattern' '
- cat >.gitignore <<-\EOF &&
- /tmp
- /fooo
- /fo?
- !foo/bar/bar
- EOF
- git ls-files -o --exclude-standard >tmp/actual &&
- cat >tmp/expected <<-\EOF &&
- .gitignore
- abc
- foo/bar/bar
- EOF
- test_cmp tmp/expected tmp/actual
-'
-
-test_expect_success 'match, excluded by literal basename pattern' '
- cat >.gitignore <<-\EOF &&
- /tmp
- /fooo
- foo
- !foo/bar/bar
- EOF
- git ls-files -o --exclude-standard >tmp/actual &&
- cat >tmp/expected <<-\EOF &&
- .gitignore
- abc
- foo/bar/bar
- EOF
- test_cmp tmp/expected tmp/actual
-'
-
-test_expect_success 'match, excluded by wildcard basename pattern' '
- cat >.gitignore <<-\EOF &&
- /tmp
- /fooo
- fo?
- !foo/bar/bar
- EOF
- git ls-files -o --exclude-standard >tmp/actual &&
- cat >tmp/expected <<-\EOF &&
- .gitignore
- abc
- foo/bar/bar
- EOF
- test_cmp tmp/expected tmp/actual
-'
-
-test_expect_success 'match, excluded by literal mustbedir, basename pattern' '
- cat >.gitignore <<-\EOF &&
- /tmp
- /fooo
- foo/
- !foo/bar/bar
- EOF
- git ls-files -o --exclude-standard >tmp/actual &&
- cat >tmp/expected <<-\EOF &&
- .gitignore
- abc
- foo/bar/bar
- EOF
- test_cmp tmp/expected tmp/actual
-'
-
-test_expect_success 'match, excluded by literal mustbedir, pathname pattern' '
- cat >.gitignore <<-\EOF &&
- /tmp
- /fooo
- /foo/
- !foo/bar/bar
- EOF
- git ls-files -o --exclude-standard >tmp/actual &&
- cat >tmp/expected <<-\EOF &&
- .gitignore
- abc
- foo/bar/bar
- EOF
- test_cmp tmp/expected tmp/actual
-'
-
-test_expect_success 'prepare for nested negatives' '
- cat >.git/info/exclude <<-\EOF &&
- /.gitignore
- /tmp
- /foo
- /abc
- EOF
- git ls-files -o --exclude-standard >tmp/actual &&
- test_must_be_empty tmp/actual &&
- mkdir -p 1/2/3/4 &&
- touch 1/f 1/2/f 1/2/3/f 1/2/3/4/f
-'
-
-test_expect_success 'match, literal pathname, nested negatives' '
- cat >.gitignore <<-\EOF &&
- /1
- !1/2
- 1/2/3
- !1/2/3/4
- EOF
- git ls-files -o --exclude-standard >tmp/actual &&
- cat >tmp/expected <<-\EOF &&
- 1/2/3/4/f
- 1/2/f
- EOF
- test_cmp tmp/expected tmp/actual
-'
-
-test_done