From: Jeff King <peff@peff.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
dloewenherz@gmail.com, git@vger.kernel.org
Subject: Re: Pretty date option for git tag?
Date: Mon, 18 May 2009 13:45:47 -0400 [thread overview]
Message-ID: <20090518174547.GA14509@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.LFD.2.01.0905181015080.3301@localhost.localdomain>
On Mon, May 18, 2009 at 10:20:49AM -0700, Linus Torvalds wrote:
> 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).
It seems like you should be able to script around for-each-ref and
remain efficient, but I don't think there is a way to convince it to
dereference tags. Something like:
git for-each-ref --format='%(refname)
Tag: %(taggername) %(taggeremail) %(taggerdate)
Commit: %(authorname) %(authoremail) %(authordate)
' refs/tags
almost works, but the commit fields are always empty. So I think you
would have to parse and manually rev-parse each one.
-Peff
PS The for-each-ref command above caused a segfault when run in git.git.
Patch to follow.
next prev parent reply other threads:[~2009-05-18 17:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 15:14 Pretty date option for git tag? dloewenherz
2009-05-18 16:02 ` Michael J Gruber
2009-05-18 17:20 ` Linus Torvalds
2009-05-18 17:45 ` Jeff King [this message]
2009-05-18 17:58 ` [PATCH] for-each-ref: fix segfault in copy_email Jeff King
2009-05-18 21:11 ` Pretty date option for git tag? Thomas Rast
2009-05-18 21:27 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090518174547.GA14509@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=dloewenherz@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).