kbuild: fix false positive -dirty tag caused by make-kpkg
[linux-2.6.git] / scripts / setlocalversion
index 1b31da8..52f032e 100644 (file)
@@ -16,7 +16,9 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
        fi
 
        # Are there uncommitted changes?
-       if git diff-index HEAD | read dummy; then
+       git update-index --refresh --unmerged > /dev/null
+       if git diff-index --name-only HEAD | grep -v "^scripts/package" \
+           | read dummy; then
                printf '%s' -dirty
        fi