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

Re: Feature Request: Passing a number as an option to git tags for displaying latest tags

From
Jacob Keller <jacob.keller@gmail.com>
Date
Jul 22, 2015, 18:36 UTC
Message-ID
<CA+P7+xpkt+23rdiKt4Cx=+K0m9cgLnd9u+g4f1W+k=-FSNumXg@mail.gmail.com>
In-Reply-To
<CALpYpjE1WE=fO0q=rGPHedZwP8JovJ0CxELBd_EhAmncRS6ZYA@mail.gmail.com>
On Wed, Jul 22, 2015 at 10:17 AM, Halil Öztürk <halilozturk55@gmail.com> wrote:
Show 14 quoted lines
> Hello team,
>
> Passing a number as an option to "git tags" command should display latest tags.
>
> e.g. "git tags -5" will display last 5 tags only.
>
> Similar behavior to "git log -5"
>
> Thanks,
> Halil
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

While interesting, this would only really work for annotated tags. How would you define order? tags are normally shown in sorted lexical order (or version-order if you pass the --sort parameter). Non-annotated tags do not contain the date time, and using the commit's date information may not be accurate. While it is possible to say show "the 5 most recent tags on a particular branch of history" that would be using the log to determine this.

What exactly would you expect the behavior to be with tags? That might help figure out what could be done instead.

Regards, Jake

Previous: Halil ÖztürkNext: Andreas Schwab
Message 2 of 10 in “Feature Request: Passing a number as an option to git tags for displaying latest tags”
  1. Halil ÖztürkJul 22, 2015
  2. Jacob KellerJul 22, 2015
  3. Andreas SchwabJul 22, 2015
  4. Junio C HamanoJul 22, 2015
  5. Junio C HamanoJul 22, 2015
  6. Michael J GruberJul 23, 2015
  7. Jacob KellerJul 23, 2015
  8. Junio C HamanoJul 23, 2015
  9. Jacob KellerJul 23, 2015
  10. Junio C HamanoJul 23, 2015

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.