summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c94c8e5)
raw | patch | inline | side by side (parent: c94c8e5)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 8 Aug 2008 20:31:27 +0000 (13:31 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 8 Aug 2008 20:31:27 +0000 (13:31 -0700) |
We used to mark the version string with '-dirty' if the cache was not up
to date, but the only thing we want to know is if the binaries are built
from modified source. Refresh the cache to avoid false dirtyness.
Christian Jaeger noticed this issue while building under fakeroot
environment (without -u) that lies about the file ownership data.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
to date, but the only thing we want to know is if the binaries are built
from modified source. Refresh the cache to avoid false dirtyness.
Christian Jaeger noticed this issue while building under fakeroot
environment (without -u) that lies about the file ownership data.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
GIT-VERSION-GEN | patch | blob | history |
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index cb7cd4b53827fa6820e84b1318572d0115b3b17f..e1290d8901bb63bf3c302c1f72a10559ea45f906 100755 (executable)
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
case "$VN" in
*$LF*) (exit 1) ;;
v[0-9]*)
+ git update-index -q --refresh
test -z "$(git diff-index --name-only HEAD --)" ||
VN="$VN-dirty" ;;
esac