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

Re: [PATCH/RFC 0/6] sort tags by date (git tag -l -D)

From
Thomas Rast <trast@student.ethz.ch>
Date
Feb 23, 2009, 09:04 UTC
Message-ID
<200902231004.25784.trast@student.ethz.ch>
In-Reply-To
<e29894ca0902221006s1c1af9f9o8c13ff9e06670d95@mail.gmail.com>
Marc-André Lureau wrote:
> I needed to sort my tags by date, and not only the annotated tags.
As others have pointed out, there's no sane way to sort 
> I was surprised that git tag didn't know how to do that. May be it
> could be handled simply by some shell script. Please tell me :)
Modulo timezone differences
  git for-each-ref --format="%(taggerdate:raw)%(committerdate:raw) %(refname:short)" refs/tags | sort -n | cut -d\  -f3

For some neat reason only one of the dates is displayed, depending on the type of object.

(Interestingly, the v0.99 tag in git.git doesn't have a date or tagger...)

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Marc-André LureauNext: Thomas Rast
Message 2 of 3 in “sort tags by date (git tag -l -D)”
  1. 0/6 sort tags by date (git tag -l -D)Marc-André Lureau, Feb 22, 2009
  2. Thomas RastFeb 23, 2009
  3. Thomas RastFeb 23, 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.