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: Markus Armbruster
Subject: Re: [PATCH] git-version-gen: Fix for tags containing '-'
Date: Sun, 06 Aug 2017 20:46:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Paul Eggert <address@hidden> writes:

> Thanks for reporting the problem. Unfortunately that patch didn't work
> for me, since Git sometimes outputs more than 4 hex digits after the
> "g", if needed to avoid ambiguity. Please try the attached further
> patch, which I installed.

You're right.  Your incremental patch works for me.  The pattern could
be tightened, but I figure it's good enough as is.

Hmm, there's an additional problem my patch fails to address: 

    # Change the first '-' to a '.', so version-comparing tools work properly.
    # Remove the "g" in git describe's output string, to save a byte.
    v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;

Messes with '-' in tags.  I think it should replace the first '-g'
instead.  What do you think?



reply via email to

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