X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft0003-attributes.sh;h=3d8e06a20fade230136d50736a2f621d3c96002c;hb=e896912c5edb8f989a2d25e101b2eb14f1a56aa9;hp=3faf135e38ccbe71241679da464d7cf709ae73d7;hpb=3c993de9f25d052b791c55609468c59bcd47fc19;p=git.git diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index 3faf135e3..3d8e06a20 100755 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh @@ -21,6 +21,7 @@ test_expect_success 'setup' ' mkdir -p a/b/d a/c && ( echo "f test=f" + echo "a/i test=a/i" ) >.gitattributes && ( echo "g test=a/g" && @@ -46,4 +47,46 @@ test_expect_success 'attribute test' ' ' +test_expect_success 'root subdir attribute test' ' + + attr_check a/i a/i && + attr_check subdir/a/i unspecified + +' + +test_expect_success 'setup bare' ' + + git clone --bare . bare.git && + cd bare.git + +' + +test_expect_success 'bare repository: check that .gitattribute is ignored' ' + + ( + echo "f test=f" + echo "a/i test=a/i" + ) >.gitattributes && + 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' ' + + ( + echo "f test=f" + echo "a/i test=a/i" + ) >info/attributes && + attr_check f f && + attr_check a/f f && + attr_check a/c/f f && + attr_check a/i a/i && + attr_check subdir/a/i unspecified + +' + test_done