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