From: Uwe Zeisberger Date: Fri, 16 Jun 2006 06:48:48 +0000 (+0200) Subject: kbuild: append -dirty for updated but uncommited changes X-Git-Tag: v2.6.18-rc1~602^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=216b2f1f718d653795024a085636d063693dd9a9;p=linux-2.6 kbuild: append -dirty for updated but uncommited changes Compare the working copy with the last commit, instead of the index. Signed-off-by: Uwe Zeisberger Acked-by: Ryan Anderson Signed-off-by: Sam Ravnborg --- diff --git a/scripts/setlocalversion b/scripts/setlocalversion index b7bc0f5b64..82e4993f0a 100644 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -16,7 +16,7 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then fi # Are there uncommitted changes? - if git diff-files | read dummy; then + if git diff-index HEAD | read dummy; then printf '%s' -dirty fi fi