| test_description=gitattributes |
| git check-attr test -- "$path" >actual && |
| echo "$path: test: $2" >expect && |
| test_expect_success 'setup' ' |
| test_expect_success 'attribute test' ' |
| attr_check a/b/g a/b/g && |
| attr_check b/g unspecified && |
| attr_check a/b/h a/b/h && |
| attr_check a/b/d/g "a/b/d/*" |
| test_expect_success 'root subdir attribute test' ' |
| attr_check subdir/a/i unspecified |
| test_expect_success 'setup bare' ' |
| git clone --bare . bare.git && |
| test_expect_success 'bare repository: check that .gitattribute is ignored' ' |
| attr_check f unspecified && |
| attr_check a/f unspecified && |
| attr_check a/c/f unspecified && |
| attr_check a/i unspecified && |
| attr_check subdir/a/i unspecified |
| test_expect_success 'bare repository: test info/attributes' ' |
| attr_check subdir/a/i unspecified |