提交 4e7434ff 编写于 作者: T Theodore Ts'o 提交者: Sam Ravnborg

kbuild: fix scripts/setlocalversion to avoid erroneous -dirty tag

If git's index file is out of date, and some files have been touched
such that their timestamp doesn't what is in the index, "git
diff-index HEAD" may show that a particular file is dirty, when in
fact it really isn't.  Running "git update-index" will update the
index to avoid these false positives.
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
上级 d882421f
......@@ -16,6 +16,7 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
fi
# Are there uncommitted changes?
git update-index --refresh --unmerged > /dev/null
if git diff-index HEAD | read dummy; then
printf '%s' -dirty
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册