浏览代码

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>
Uwe Zeisberger 19 年之前
父节点
当前提交
216b2f1f71
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/setlocalversion

+ 1 - 1
scripts/setlocalversion

@@ -16,7 +16,7 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
 	fi
 	fi
 
 
 	# Are there uncommitted changes?
 	# Are there uncommitted changes?
-	if git diff-files | read dummy; then
+	if git diff-index HEAD | read dummy; then
 		printf '%s' -dirty
 		printf '%s' -dirty
 	fi
 	fi
 fi
 fi