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

Re: [PATCH] ls-remote: create '--sort' option

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 2, 2018, 20:12 UTC
Message-ID
<xmqq1sfxz7t4.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180402200736.80161-1-haraldnordgren@gmail.com>
Harald Nordgren <haraldnordgren@gmail.com> writes:
> Subject: Re: [PATCH] ls-remote: create '--sort' option

It would be more helpful to mark as [PATCH v2] a rerolled patch like this.

Show 5 quoted lines
> Create a '--sort' option for ls-remote. This is useful e.g. for the Go
> repository after the release of version 1.10, where by default v1.10 is
> sorted before v1.2. See:
>
> 	$ git ls-remote -t https://go.googlesource.com/go

Does this sample command line also need updating for the refined design?

Show 11 quoted lines
> 	...
> 	205f850ceacfc39d1e9d76a9569416284594ce8c        refs/tags/go1.1
> 	d260448f6b6ac10efe4ae7f6dfe944e72bc2a676        refs/tags/go1.1.1
> 	1d6d8fca241bb611af51e265c1b5a2e9ae904702        refs/tags/go1.1.2
> 	bf86aec25972f3a100c3aa58a6abcbcc35bdea49        refs/tags/go1.10
> 	ac7c0ee26dda18076d5f6c151d8f920b43340ae3        refs/tags/go1.10.1
> ...
> +	git ls-remote --sort="-version:refname" --tags self >actual &&
> +	test_cmp expect actual
> +...
> +	git ls-remote --sort="-refname" --tags self >actual &&

These both look sensible (also the variant without the dash prefix which I omitted from the quote).

Previous: Harald NordgrenNext: Harald Nordgren
Message 2 of 4 in “ls-remote: create '--sort' option”
  1. ls-remote: create '--sort' optionHarald Nordgren, Apr 2, 2018
  2. Junio C HamanoApr 2, 2018
  3. Harald NordgrenApr 2, 2018
  4. Jeff KingApr 2, 2018

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.