threads / discuss / 7820

chronologically listed tags?

Subject: chronologically listed tags?

## tl;dr

3 messages between Apr 24, 2007 and Apr 24, 2007.

replies: 2people: 2as markdown or json

Michael Dressel· Apr 24, 2007, 17:36 UTC · lore
Hi,

I would like to list tags chronologically. I failed to find out how to do this using git or cogito directly. So I wrote the simplistic bash script below. Is there a way more direct way?

----- #!/bin/bash

export PAGER=''
git-tag -l |
while read line
do
    MYTIME=`git-show --pretty=raw $line | perl -ne 'print $1 if /committer\s+\w+\s+\S+\s+(\d+)/'`
    echo "$MYTIME $line"
done | sort | perl -ne 'use POSIX qw(strftime); if (  /(\d+) (\S+)/ ) {print strftime "%a %b %e %H:%M:%S %Y", localtime $1; print "\t\t$2\n" }'
------

Cheers, Michael

Shawn O. Pearce· Apr 24, 2007, 17:42 UTC · re: Michael Dressel · lore

Re: chronologically listed tags?

Michael Dressel <MichaelTiloDressel@t-online.de> wrote:
> I would like to list tags chronologically. I failed to find out how to do 
> this using git or cogito directly. So I wrote the simplistic bash script 
> below. Is there a way more direct way?
for-each-ref is your friend:
	git for-each-ref --sort='taggerdate' refs/tags
-- 
Shawn.
Michael Dressel· Apr 24, 2007, 19:59 UTC · re: Shawn O. Pearce · lore

Re: chronologically listed tags?

On Tue, 24 Apr 2007, Shawn O. Pearce wrote:
Show 12 quoted lines
> Michael Dressel <MichaelTiloDressel@t-online.de> wrote:
> > I would like to list tags chronologically. I failed to find out how to do 
> > this using git or cogito directly. So I wrote the simplistic bash script 
> > below. Is there a way more direct way?
> 
> for-each-ref is your friend:
> 
> 	git for-each-ref --sort='taggerdate' refs/tags
> 
> -- 
> Shawn.
> 
Hi Shawn,
great thanx.
Michael

← back to recent threads