diff options
author | Jeff King <peff@peff.net> | 2012-11-09 12:42:25 -0500 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2012-11-09 12:42:25 -0500 |
commit | 5f836422aba81b5a990ca5251892bfe26ec8125c (patch) | |
tree | d5eb91a8ead36a41c428b75c36ea8962837ebb86 /t/t0003-attributes.sh | |
parent | 8736c9010c23fb1e903fc2b16351f18d477c56aa (diff) | |
parent | 82dce998c2028b6ee96691921b7037a6e182ec89 (diff) | |
download | git-5f836422aba81b5a990ca5251892bfe26ec8125c.tar.gz |
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-x | t/t0003-attributes.sh | 10 |
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 |