# chronologically listed tags?

3 messages from 2007-04-24 to 2007-04-24. Participants: Michael Dressel, Shawn O. Pearce.
Thread: https://gitlist.dev/t/7820

## Michael Dressel, 2007-04-24 17:36

Subject: chronologically listed tags?
Message-ID: <Pine.LNX.4.64.0704241924070.4438@castor.milkiway.cos>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0704241924070.4438%40castor.milkiway.cos

```
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, 2007-04-24 17:42

Subject: Re: chronologically listed tags?
Message-ID: <20070424174217.GB5942@spearce.org>
URL: https://gitlist.dev/e/20070424174217.GB5942%40spearce.org
In-Reply-To: <Pine.LNX.4.64.0704241924070.4438@castor.milkiway.cos>

```
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, 2007-04-24 19:59

Subject: Re: chronologically listed tags?
Message-ID: <Pine.LNX.4.64.0704242158090.4291@castor.milkiway.cos>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0704242158090.4291%40castor.milkiway.cos
In-Reply-To: <20070424174217.GB5942@spearce.org>

```


On Tue, 24 Apr 2007, Shawn O. Pearce wrote:

> 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

```
