X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft0003-attributes.sh;h=ebbc7554a7d4dce4c2ed33a79f5d4feb3a520f05;hb=f6aca0dc4d6b7ed9bf2bff399e3fcb47eafdce4b;hp=de38c7f7aab16a0c2766ef020a3fc03fadece555;hpb=ae830c211bfbf192bcefb821130fe4943daf4291;p=git.git diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index de38c7f7a..ebbc7554a 100755 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh @@ -36,6 +36,9 @@ test_expect_success 'setup' ' echo "d/* test=a/b/d/*" echo "d/yes notest" ) >a/b/.gitattributes + ( + echo "global test=global" + ) >"$HOME"/global-gitattributes ' @@ -57,9 +60,19 @@ test_expect_success 'attribute test' ' ' +test_expect_success 'core.attributesfile' ' + attr_check global unspecified && + git config core.attributesfile "$HOME/global-gitattributes" && + attr_check global global && + git config core.attributesfile "~/global-gitattributes" && + attr_check global global && + echo "global test=precedence" >> .gitattributes && + attr_check global precedence +' + test_expect_success 'attribute test: read paths from stdin' ' - cat < expect + cat < expect && f: test: f a/f: test: f a/c/f: test: f