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).