From: Michael Haggerty Date: Thu, 28 Jul 2011 10:37:02 GMT Subject: [RFC 3/6] git-check-attr: Demonstrate problems with relative paths Message-ID: <1311849425-9057-4-git-send-email-mhagger@alum.mit.edu> In-Reply-To: <1311849425-9057-1-git-send-email-mhagger@alum.mit.edu> Signed-off-by: Michael Haggerty --- t/t0003-attributes.sh | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index 43957ea..f6cf77d 100755 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh @@ -19,7 +19,7 @@ attr_check () { test_expect_success 'setup' ' - mkdir -p a/b/d a/c && + mkdir -p a/b/d a/c b && ( echo "[attr]notest !test" echo "f test=f" @@ -102,6 +102,19 @@ test_expect_failure 'unnormalized paths' ' ' +test_expect_failure 'relative paths' ' + + (cd a && attr_check ../f f) && + (cd a && attr_check f f) && + (cd a && attr_check i a/i) && + (cd a && attr_check g a/g) && + (cd a && attr_check b/g a/b/g) && + (cd b && attr_check ../a/f f) && + (cd b && attr_check ../a/g a/g) && + (cd b && attr_check ../a/b/g a/b/g) + +' + test_expect_success 'core.attributesfile' ' attr_check global unspecified && git config core.attributesfile "$HOME/global-gitattributes" && -- 1.7.6.8.gd2879