"NODA, Kai" [off-list ref] writes:
Here I wonder whether "head -1" is generally correct or not when I want
the oldest tag.
Since the output of git tag is sorted by name, generally not.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Thank you for your reply, Andreas
Andreas Schwab wrote:
...
quoted
Here I wonder whether "head -1" is generally correct or not when I want
the oldest tag.
Since the output of git tag is sorted by name, generally not.
Wow, I didn't know that.
But then, under the assumption that tags have names like verNNN,
that behavior ensures me that "head -1" works as intended.
Maybe I look at its implementation ( refs.c:do_for_each_ref , right?)
but this seems a tough code to comprehend, especially around
packed/loose/extra ...
Thanks,
Kai
On Thu, Dec 24, 2009 at 05:37:35AM +0900, NODA, Kai wrote:
quoted
Since the output of git tag is sorted by name, generally not.
Wow, I didn't know that.
But then, under the assumption that tags have names like verNNN,
that behavior ensures me that "head -1" works as intended.
If that assumption does not hold, you can also sort by date. See:
http://article.gmane.org/gmane.comp.version-control.git/133586
-Peff