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

Re: [PATCH] tag: support --sort=version

From
Duy Nguyen <pclouds@gmail.com>
Date
Feb 21, 2014, 11:58 UTC
Message-ID
<CACsJy8BrfKckHzgwRnW_UMTjipuYWGVcumvCmQC9EG1Eq-MScA@mail.gmail.com>
In-Reply-To
<20140220204345.GA3374@sigill.intra.peff.net>
On Fri, Feb 21, 2014 at 3:43 AM, Jeff King <peff@peff.net> wrote:
> I think I actually prefer the full word "version", as you have already.
> It's clear what it means, and we can extend the syntax generally to:
Agreed. It's hard to find a letter that reminds you about "version".
Show 18 quoted lines
>
>   --sort=[-][comparison:]field
>
> like:
>
>   --sort=-version:subject
>
> for descending version-sort by subject.  And then as a special-case
> convenience, make "version" without a field default to
> "version:refname". There's no ambiguity because the set of comparison
> names and field-names is fixed, and we know there is no overlap.
>
> If want to, we can _also_ give a one-letter abbreviation to the
> comparison field, like:
>
>   --sort=v:subject
>
> but that is not necessary.
Why not reversed order? So its syntax could be
[ "-" ] FIELD [ ":" [ "version" | "v" ] ]

It fits better to current f-e-r syntax where modifiers are after the colon. And it avoids the possibility that someone adds field "version" and we can't tell what "version" is what.

-- 
Duy
Previous: Jeff KingNext: Junio C Hamano
Message 5 of 25 in “tag: support --sort=version”
  1. tag: support --sort=versionNguyễn Thái Ngọc Duy, Feb 19, 2014
  2. Jeff KingFeb 19, 2014
  3. Duy NguyenFeb 19, 2014
  4. Jeff KingFeb 20, 2014
  5. Duy NguyenFeb 21, 2014
  6. Junio C HamanoFeb 21, 2014
  7. Jeff KingFeb 22, 2014
  8. Duy NguyenFeb 22, 2014
  9. Eric SunshineFeb 19, 2014
  10. tag: support --sort=<spec>Nguyễn Thái Ngọc Duy, Feb 22, 2014
  11. Jeff KingFeb 22, 2014
  12. Junio C HamanoFeb 24, 2014
  13. Duy NguyenFeb 24, 2014
  14. Jeff KingFeb 24, 2014
  15. tag: support --sort=<spec>Nguyễn Thái Ngọc Duy, Feb 25, 2014
  16. Junio C HamanoFeb 25, 2014
  17. Jeff KingFeb 26, 2014
  18. Duy NguyenFeb 26, 2014
  19. Jeff KingFeb 26, 2014
  20. Duy NguyenFeb 26, 2014
  21. Jeff KingFeb 26, 2014
  22. Duy NguyenFeb 26, 2014
  23. tag: support --sort=<spec>Nguyễn Thái Ngọc Duy, Feb 27, 2014
  24. Jeff KingFeb 27, 2014
  25. Duy NguyenFeb 27, 2014

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.