bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] git-version-gen: Fix for tags containing '-'


From: Jim Meyering
Subject: Re: [PATCH] git-version-gen: Fix for tags containing '-'
Date: Sun, 6 Aug 2017 09:04:53 -0700

On Sat, Aug 5, 2017 at 11:26 PM, Markus Armbruster <address@hidden> wrote:
> Really old versions of git-describe (before v1.5.0, Feb 2007) don't
> have the number of commits in their long format output, i.e. where
> modern 'git describe --abbrev=4 --match="v*"' prints
> "v0.1-1494-g124b9", they print "v0.1-1494-g124b9".  git-version-gen
> recognizes both patterns, and normalizes the old format to the new
> one.
>
> Unfortunately, this normalization code gets confused when the tag
> contains '-'.  Reproducer:
>
>     $ git-tag -m test v0.2-rc1
>     $ build-aux/git-version-gen .tarball-version; echo
>     build-aux/git-version-gen: WARNING: git rev-list failed
>     UNKNOWN
>
> We take exact tag "v0.2-rc1" for the old format, extract the presumed
> tag "v0.2" from it, then run "git rev-list v0.2..HEAD" to count
> commits since tha tag.  Fails, because tag "v0.2" does not exist.
>
> We could perhaps drop support for versions from more than a decade
> ago.  But tightening the pattern match is easy enough, so do that.
> Still breaks when you use version tags ending in something matching
> -g????, but you arguably get what you deserve then.

Hi Markus!

Thank you for that patch.
I've tweaked the commit log, copied it into the ChangeLog file and pushed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]