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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user