From: Jim Meyering Date: Sat, 3 Nov 2007 16:46:42 +0000 (+0100) Subject: Change the first '-' to '.' in the snapshot version string, X-Git-Tag: v6.9.89~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8beb69b1480485bb81b16c0eb90f49d76cd8dd94;p=thirdparty%2Fcoreutils.git Change the first '-' to '.' in the snapshot version string, e.g., 6.9-377-08144 -> 6.9.377-08144 * build-aux/git-version-gen: ... and add comments. --- diff --git a/ChangeLog b/ChangeLog index 4d931f3c36..ca1ac5d38c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-11-03 Jim Meyering + Change the first '-' to '.' in the snapshot version string, + e.g., 6.9-377-08144 -> 6.9.377-08144 + * build-aux/git-version-gen: ... and add comments. + seq: add another test for the %% bug. * tests/misc/seq (fmt-c): Test the other fixed case, too. diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index c433c262d2..4e8ffc6eaf 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -42,8 +42,9 @@ elif test -d .git \ *) (exit 1) ;; esac then - # Remove the "g" in git-describe's output string. - v=`echo "$v" | sed 's/\(.*\)-g/\1-/'`; + # 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-/'`; else v=UNKNOWN fi