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:
authorJeff King <peff@peff.net>2012-11-09 21:42:25 +0400
committerJeff King <peff@peff.net>2012-11-09 21:42:25 +0400
commit5f836422aba81b5a990ca5251892bfe26ec8125c (patch)
treed5eb91a8ead36a41c428b75c36ea8962837ebb86 /t/t0003-attributes.sh
parent8736c9010c23fb1e903fc2b16351f18d477c56aa (diff)
parent82dce998c2028b6ee96691921b7037a6e182ec89 (diff)
Merge branch 'nd/attr-match-optim-more'
Start laying the foundation to build the "wildmatch" after we can agree on its desired semantics. * nd/attr-match-optim-more: attr: more matching optimizations from .gitignore gitignore: make pattern parsing code a separate function exclude: split pathname matching code into a separate function exclude: fix a bug in prefix compare optimization exclude: split basename matching code into a separate function exclude: stricten a length check in EXC_FLAG_ENDSWITH case
Diffstat (limited to 't/t0003-attributes.sh')
-rwxr-xr-xt/t0003-attributes.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index febc45c9cc..807b8b88e2 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -196,6 +196,16 @@ test_expect_success 'root subdir attribute test' '
attr_check subdir/a/i unspecified
'
+test_expect_success 'negative patterns' '
+ echo "!f test=bar" >.gitattributes &&
+ test_must_fail git check-attr test -- f
+'
+
+test_expect_success 'patterns starting with exclamation' '
+ echo "\!f test=foo" >.gitattributes &&
+ attr_check "!f" foo
+'
+
test_expect_success 'setup bare' '
git clone --bare . bare.git &&
cd bare.git