git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Gernhardt <brian@gernhardtsoftware.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] t1410: Fix for case insensitive filesystems
Date: Sun,  9 Nov 2014 20:48:06 -0500	[thread overview]
Message-ID: <1415584086-41637-1-git-send-email-brian@gernhardtsoftware.com> (raw)

A pair of recently added tests used branches a and a/b, but earlier
tests created files A and A/B.  On case insensitive filesystems (such
as HFS+), that causes git to complain about the name being ambiguous
between branch and file.  Resolve by renaming the branches to aa and
aa/bb.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
---
 t/t1410-reflog.sh | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 976c1d4..ac31e19 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -254,36 +254,36 @@ test_expect_success 'checkout should not delete log for packed ref' '
 '
 
 test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '
-	test_when_finished "git branch -d a || git branch -d a/b" &&
+	test_when_finished "git branch -d aa || git branch -d aa/bb" &&
 
-	git branch a/b master &&
-	echo "a/b@{0} branch: Created from master" >expect &&
-	git log -g --format="%gd %gs" a/b >actual &&
+	git branch aa/bb master &&
+	echo "aa/bb@{0} branch: Created from master" >expect &&
+	git log -g --format="%gd %gs" aa/bb >actual &&
 	test_cmp expect actual &&
-	git branch -d a/b &&
+	git branch -d aa/bb &&
 
-	# now logs/refs/heads/a is a stale directory, but
-	# we should move it out of the way to create "a" reflog
-	git branch a master &&
-	echo "a@{0} branch: Created from master" >expect &&
-	git log -g --format="%gd %gs" a >actual &&
+	# now logs/refs/heads/aa is a stale directory, but
+	# we should move it out of the way to create "aa" reflog
+	git branch aa master &&
+	echo "aa@{0} branch: Created from master" >expect &&
+	git log -g --format="%gd %gs" aa >actual &&
 	test_cmp expect actual
 '
 
 test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '
-	test_when_finished "git branch -d a || git branch -d a/b" &&
+	test_when_finished "git branch -d aa || git branch -d aa/bb" &&
 
-	git branch a/b master &&
-	echo "a/b@{0} branch: Created from master" >expect &&
-	git log -g --format="%gd %gs" a/b >actual &&
+	git branch aa/bb master &&
+	echo "aa/bb@{0} branch: Created from master" >expect &&
+	git log -g --format="%gd %gs" aa/bb >actual &&
 	test_cmp expect actual &&
-	git branch -d a/b &&
+	git branch -d aa/bb &&
 
-	# same as before, but we only create a reflog for "a" if
+	# same as before, but we only create a reflog for "aa" if
 	# it already exists, which it does not
-	git -c core.logallrefupdates=false branch a master &&
+	git -c core.logallrefupdates=false branch aa master &&
 	: >expect &&
-	git log -g --format="%gd %gs" a >actual &&
+	git log -g --format="%gd %gs" aa >actual &&
 	test_cmp expect actual
 '
 
-- 
2.2.0.rc0.209.g31b9a22

             reply	other threads:[~2014-11-10  1:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10  1:48 Brian Gernhardt [this message]
2014-11-10  6:23 ` [PATCH] t1410: Fix for case insensitive filesystems Jeff King
2014-11-10  6:34   ` Junio C Hamano

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=1415584086-41637-1-git-send-email-brian@gernhardtsoftware.com \
    --to=brian@gernhardtsoftware.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).