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

Re: t5505-remote fails on Windows

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 19, 2009, 07:20 UTC
Message-ID
<49C1F232.2090009@viscovery.net>
In-Reply-To
<20090319044313.GA341@coredump.intra.peff.net>
Jeff King schrieb:
Show 6 quoted lines
> I didn't look closely enough at your issue, which is one
> ref pushing to two different places. For that, the sort needs to take
> into account the util field, which holds the destination.
> 
> The patch below probably fixes it, but as I can't actually reproduce
> here, it is largely untested.

Your patch fixes it. The following change to the test case would be a good addition; it protects later tests from failures in earlier tests.

-- Hannes
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 5ec668d..13f32b8 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -160,7 +160,7 @@ cat > test/expect << EOF
     master pushes to another (up to date)
 EOF

-test_expect_success 'show' '
+test_expect_success 'more setup for show' '
 	(cd test &&
 	 git config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&
 	 git fetch &&
@@ -183,12 +183,20 @@ test_expect_success 'show' '
 	 git config --add remote.origin.push refs/heads/master:refs/heads/upstream &&
 	 git config --add remote.origin.push +refs/tags/lastbackup &&
 	 git config --add remote.two.push +refs/heads/ahead:refs/heads/master &&
-	 git config --add remote.two.push refs/heads/master:refs/heads/another &&
+	 git config --add remote.two.push refs/heads/master:refs/heads/another)
+'
+
+test_expect_success 'show' '
+	(cd test &&
 	 git remote show origin two > output &&
-	 git branch -d rebase octopus &&
 	 test_cmp expect output)
 '

+test_expect_success 'more setup for show -n' '
+	(cd test &&
+	 git branch -d rebase octopus)
+'
+
 cat > test/expect << EOF
 * remote origin
   URL: $(pwd)/one
Previous: Jeff KingNext: Jeff King
Message 6 of 18 in “t5505-remote fails on Windows”
  1. Johannes SixtMar 18, 2009
  2. Jeff KingMar 19, 2009
  3. Jeff KingMar 19, 2009
  4. Jay SoffianMar 19, 2009
  5. Jeff KingMar 19, 2009
  6. Johannes SixtMar 19, 2009
  7. Jeff KingMar 19, 2009
  8. Johannes SchindelinMar 19, 2009
  9. Junio C HamanoMar 19, 2009
  10. Jay SoffianMar 19, 2009
  11. Jeff KingMar 19, 2009
  12. Johannes SchindelinMar 19, 2009
  13. remote: improve sorting of "configure for git push" listJeff King, Mar 22, 2009
  14. Jay SoffianMar 22, 2009
  15. Junio C HamanoMar 22, 2009
  16. Johannes SixtMar 23, 2009
  17. Junio C HamanoMar 23, 2009
  18. Jeff KingMar 19, 2009

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.