From: Andreas Gruenbacher Date: Mon, 12 Apr 2010 15:56:27 +0000 (+0200) Subject: git-version-gen: use "git update-index..." rather than "git status" X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=197b47e41bbf202b2f1abf45a43515200470bf47;p=pspp 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. --- diff --git a/ChangeLog b/ChangeLog index 8dc4d2c5d2..73c6e308e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-12 Andreas Gruenbacher + + 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 Jim Meyering openat: correct formatting (no semantic change) diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index 16da2a8f6c..e754c77d6a 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -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