From f5114a40c0d0276ce6ff215a3dc51eb19da5b420 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Thu, 4 Aug 2011 06:47:46 +0200 Subject: git-check-attr: Normalize paths Normalize the path arguments (relative to the working tree root, if applicable) before looking up their attributes. This requires passing the prefix down the call chain. This fixes two test cases for different reasons: * "unnormalized paths" is fixed because the .gitattribute-file-seeking code is not confused into reading the top-level file twice. * "relative paths" is fixed because the canonical pathnames are passed to get_check_attr() or get_all_attrs(), allowing them to match the pathname patterns as expected. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- t/t0003-attributes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t0003-attributes.sh') diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index f6cf77d12..ae2f1da28 100755 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh @@ -93,7 +93,7 @@ test_expect_success 'attribute test' ' ' -test_expect_failure 'unnormalized paths' ' +test_expect_success 'unnormalized paths' ' attr_check ./f f && attr_check ./a/g a/g && @@ -102,7 +102,7 @@ test_expect_failure 'unnormalized paths' ' ' -test_expect_failure 'relative paths' ' +test_expect_success 'relative paths' ' (cd a && attr_check ../f f) && (cd a && attr_check f f) && -- cgit v1.2.1