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

Re: t5505-remote fails on Windows

From
Jeff King <peff@peff.net>
Date
Mar 19, 2009, 04:18 UTC
Message-ID
<20090319041837.GA32642@coredump.intra.peff.net>
In-Reply-To
<49C0DE23.8020809@viscovery.net>
On Wed, Mar 18, 2009 at 12:42:27PM +0100, Johannes Sixt wrote:
Show 20 quoted lines
> --- expect      Wed Mar 18 11:22:53 2009
> +++ output      Wed Mar 18 11:22:54 2009
> @@ -12,8 +12,8 @@
>                  and with remote topic-c
>      rebase  rebases onto remote master
>    Local refs configured for 'git push':
> -    master pushes to master   (local out of date)
>      master pushes to upstream (create)
> +    master pushes to master   (local out of date)
>  * remote two
>    URL: ../two
>    HEAD branch (remote HEAD is ambiguous, may be one of the following):
> * FAIL 8: show
> 
> 
> As you can see, the entries for "master pushes to..." are reversed. It
> seems that this output is not stable. Before I delve into this, do you
> know whether there is some data structure involved that does not guarantee
> the order? Such as a hash table, a opendir/readdir sequence, or perhaps
> while reading the config file?
That is quite curious, because it is sorted immediately before printing:
  $ sed -n 1034,1040p builtin-remote.c
        for_each_string_list(add_push_to_show_info, &states.push, &info);
        sort_string_list(info.list);
        if (info.list->nr)
                printf("  Local ref%s configured for 'git push'%s:\n",
                        info.list->nr > 1 ? "s" : "",
                        no_query ? " (status not queried)" : "");
        for_each_string_list(show_push_info_item, info.list, &info);

can you step through in a debugger and make sure the sort_string_list is actually sorting?

-Peff
Previous: Johannes SixtNext: Jeff King
Message 2 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.