git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Failure in t5516, tests 15 and 16

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 27, 2007, 01:44 UTC
Message-ID
<7v4pkuuq5u.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<CFDE3792-403B-4582-B7FB-BC142B79AE63@silverinsanity.com>
Brian Gernhardt <benji@silverinsanity.com> writes:
Show 6 quoted lines
> On Jun 22, 2007, at 10:50 AM, Brian Gernhardt wrote:
>
>> Tests 15 and 16 in script "t5516-fetch-push.sh" fails with "notice:
>> HEAD points to an unborn branch (master)".  Is this just bad tests
>> or an actual failure?  This is with current master
>> (45fd8bd32dd68ce6b14a406d0abbd6f56490131c) on OS X.
Can you check "cd t && sh -x t5516-fetch-push.sh -i -v"?
I am suspecting that
                test "$( cd testrepo && git show-ref | wc -l )" = 1

may have an interesting effect when "wc -l" emits extra whitespaces. Does this fix it for you?

diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 08d58e1..c0fa2ba 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -226,7 +226,7 @@ test_expect_success 'push with colon-less refspec (3)' '
 	git branch -f frotz master &&
 	git push testrepo frotz &&
 	check_push_result $the_commit heads/frotz &&
-	test "$( cd testrepo && git show-ref | wc -l )" = 1
+	test 1 = $(cd testrepo && git show-ref | wc -l)
 '
 
 test_expect_success 'push with colon-less refspec (4)' '
@@ -239,7 +239,7 @@ test_expect_success 'push with colon-less refspec (4)' '
 	git tag -f frotz &&
 	git push testrepo frotz &&
 	check_push_result $the_commit tags/frotz &&
-	test "$( cd testrepo && git show-ref | wc -l )" = 1
+	test 1 = $(cd testrepo && git show-ref | wc -l)
 
 '
 
Previous: Brian GernhardtNext: Brian Gernhardt
Message 3 of 4 in “Failure in t5516, tests 15 and 16”
  1. Brian GernhardtJun 22, 2007
  2. Brian GernhardtJun 27, 2007
  3. Junio C HamanoJun 27, 2007
  4. Brian GernhardtJun 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.