From: Thomas Rast Date: Mon, 23 Feb 2009 09:04:23 GMT Subject: Re: [PATCH/RFC 0/6] sort tags by date (git tag -l -D) Message-ID: <200902231004.25784.trast@student.ethz.ch> In-Reply-To: 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