All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Michael Haggerty <mhagger@alum.mit.edu>
Subject: [RFC 3/6] git-check-attr: Demonstrate problems with relative paths
Date: Thu, 28 Jul 2011 12:37:02 +0200	[thread overview]
Message-ID: <1311849425-9057-4-git-send-email-mhagger@alum.mit.edu> (raw)
In-Reply-To: <1311849425-9057-1-git-send-email-mhagger@alum.mit.edu>


Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 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

  parent reply	other threads:[~2011-07-28 10:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 10:36 [RFC 0/6] git-check-attr should work for relative paths Michael Haggerty
2011-07-28 10:37 ` [RFC 1/6] git-check-attr: test that no output is written to stderr Michael Haggerty
2011-07-28 10:37 ` [RFC 2/6] git-check-attr: Demonstrate problems with unnormalized paths Michael Haggerty
2011-07-28 10:37 ` Michael Haggerty [this message]
2011-07-28 10:37 ` [RFC 4/6] git-check-attr: Normalize paths Michael Haggerty
2011-08-02 17:24   ` Junio C Hamano
2011-08-04  3:32     ` Michael Haggerty
2011-08-04 17:05       ` Junio C Hamano
2011-08-05  6:24         ` Michael Haggerty
2011-08-05 15:02           ` Junio C Hamano
2011-08-07  4:32             ` Michael Haggerty
2011-07-28 10:37 ` [RFC 5/6] test-path-utils: Add subcommand "absolute_path" Michael Haggerty
2011-07-28 10:37 ` [RFC 6/6] test-path-utils: Add subcommand "prefix_path" Michael Haggerty
2011-08-02 22:02 ` [RFC 0/6] git-check-attr should work for relative paths Junio C Hamano
2011-08-04  3:35   ` Michael Haggerty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311849425-9057-4-git-send-email-mhagger@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.