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

Re: Pretty date option for git tag?

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
May 18, 2009, 17:20 UTC
Message-ID
<alpine.LFD.2.01.0905181015080.3301@localhost.localdomain>
In-Reply-To
<4A118696.80902@drmicha.warpmail.net>
On Mon, 18 May 2009, Michael J Gruber wrote:
Show 7 quoted lines
> 
> You might want to experiment with
> 
> git log --tags --simplify-by-decoration --pretty="format:%ai %s"
> 
> which may show a few more commits than just the tags but comes close to
> the output you envisage.
Ooh, evil. I like it.

It's a rather expensive operation, but it does have the really nice property that it will show the date of the commit the tag is pointing to, rather than necessarily the date of the tag itself (which is not well-defined unless the tag is signed).

As you mention, "--simplify-by-decoration" will show merges too (unless it can linearize the tag history), but you can work around that by making the format be "format:%ai %d" where that '%d' shows the decoration of the commit, rather than the commit summary. Now the merges that aren't tagged stand out very clearly.

Of course, the above will just work for commit tags. If you've tagged a tree or a blob, the above gives you bubkis.

			Linus
Previous: Michael J GruberNext: Jeff King
Message 3 of 7 in “Pretty date option for git tag?”
  1. dloewenherz@gmail.comMay 18, 2009
  2. Michael J GruberMay 18, 2009
  3. Linus TorvaldsMay 18, 2009
  4. Jeff KingMay 18, 2009
  5. for-each-ref: fix segfault in copy_emailJeff King, May 18, 2009
  6. Thomas RastMay 18, 2009
  7. Jeff KingMay 18, 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.