On Thursday, 28 August 2014 at 05:13:06 UTC, Andrei Alexandrescu
wrote:
On 8/27/14, 9:47 PM, Andrew Edwards wrote:
Anyone here knows how to consistently obtain the previous tag
on git?
Are tags always coming in order? Then it's easy:
git tag | tail -n2 | head -n1
Andrei
Not in semver order unfortunately. This will be changed in new
git version though
(http://blogs.atlassian.com/2014/08/whats-new-git-2-1/)
Andrew, what is your desired definiton of "prior"? This `git
abbrev` command finds previos named commit by traversing _commit_
history. If it returns v2.066.0-b1 that means that this tag was
created later in the commit sequence than v2.066.0 (which is not
surprising)