git-version-gen: use "git update-index..." rather than "git status"
authorIan Beckwith <ianb@erislabs.net>
Mon, 19 Apr 2010 15:57:07 +0000 (16:57 +0100)
committerIan Beckwith <ianb@erislabs.net>
Mon, 19 Apr 2010 15:57:07 +0000 (16:57 +0100)
* build-aux/git-version-gen: Use git update-index --refresh, not
"git status".  With some versions of git, "git status" would fail
to update the index and result in an unwarranted "-dirty" suffix.

(cherry picked from commit 197b47e41bbf202b2f1abf45a43515200470bf47)

ChangeLog
build-aux/git-version-gen

index 7e4eed0..3e2b5f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-12  Andreas Gruenbacher  <agruen@suse.de>
+
+       git-version-gen: use "git update-index..." rather than "git status"
+       * build-aux/git-version-gen: Use git update-index --refresh, not
+       "git status".  With some versions of git, "git status" would fail
+       to update the index and result in an unwarranted "-dirty" suffix.
+
 2010-04-11  Bruno Haible  <bruno@clisp.org>
 
        libunistring: Correct value of $LTLIBUNISTRING.
index 16da2a8..e754c77 100755 (executable)
@@ -127,7 +127,7 @@ fi
 v=`echo "$v" |sed 's/^v//'`
 
 # Don't declare a version "dirty" merely because a time stamp has changed.
-git status > /dev/null 2>&1
+git update-index --refresh > /dev/null 2>&1
 
 dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
 case "$dirty" in