Subject: Re: [PATCH] Use perl instead of tac

From: Jörg Sommer <[email-masked]>
Date: Wed, 30 Apr 2008 11:02:06 +0200

Hi Brian,

Brian Gernhardt schrieb am Mon 28. Apr, 15:13 (-0400):
> This loop-reverse-loop construct is _extremely_ ugly, and I'm having  
> problems following it.  None of what this function is doing is  
> immediately obvious.  It's a good candidate for a comment or two.

I write one.

> I also dislike the large lists this is carrying around in shell  
> variables.  If I'm reading it correctly, the tag list could be replaced 
> by invocations of "git describe --exact-match".

Yes. How to get all tags of a commit?

% git tag foo v1.5.5
% git describe --exact-match 9d831805195ba40b62f632acc6bb6e53d3
warning: tag 'v1.5.5' is really 'foo' here
v1.5.5

> Now that I think about it, the generation of marks could be done by a  
> second loop over the list.  Notice what commits need to be marked in  
> loop 1, then add the mark commands in loop 2.  Both of these loops would 
> function in the same direction, removing the need for either tac or perl.

You are right.

Thanks for your comments.

Bye, Jörg.
-- 
Damit das Mögliche entsteht, muß immer wieder das Unmögliche versucht
werden.                                       (Hermann Hesse)