From 216b2f1f718d653795024a085636d063693dd9a9 Mon Sep 17 00:00:00 2001
From: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Date: Fri, 16 Jun 2006 08:48:48 +0200
Subject: [PATCH] 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 <zeisberg@informatik.uni-freiburg.de>
Acked-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/setlocalversion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index b7bc0f5b64f6..82e4993f0a73 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
-- 
GitLab