From e70a5746d551aaa8f579c50c09a14e528e4cfcfc Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 27 Sep 2013 12:17:48 +0200 Subject: tools/git-version-gen: keep the g before the git commit number --- tools/git-version-gen | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/git-version-gen b/tools/git-version-gen index 34682473..116af68e 100755 --- a/tools/git-version-gen +++ b/tools/git-version-gen @@ -185,7 +185,7 @@ then # 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-/'`; + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-g/'`; v_from_git=1 elif test "x$fallback" = x || git --version >/dev/null 2>&1; then v=UNKNOWN @@ -203,6 +203,7 @@ if test "x$v_from_git" != x; then git update-index --refresh > /dev/null 2>&1 dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= + case "$dirty" in '') ;; *) # Append the suffix only if there isn't one already. -- cgit