Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

git-check-attr: Demonstrate problems with relative paths

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information...
commit 0216af8356ef562147251c40fef72be25b8b9b07 1 parent d4d4f8d
@mhagger mhagger authored gitster committed
Showing with 14 additions and 1 deletion.
  1. +14 −1 t/t0003-attributes.sh
View
15 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" &&
Please sign in to comment.
Something went wrong with that request. Please try again.