Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-08-04 08:47:45 +0400
committerJunio C Hamano <gitster@pobox.com>2011-08-05 02:57:18 +0400
commit0216af8356ef562147251c40fef72be25b8b9b07 (patch)
tree9a119c713ea377e74c7ed4037fc77c407c31f83f /t/t0003-attributes.sh
parentd4d4f8df14c3c19d445a8a79dca56bd33812ee04 (diff)
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>
Diffstat (limited to 't/t0003-attributes.sh')
-rwxr-xr-xt/t0003-attributes.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 43957eae68..f6cf77d125 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" &&