History

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.

Theodore Ts'o committed 19 years ago

Commit 4e7434f1 parent d8824211 file · +1 −0Browse files

Showing the changes to scripts/setlocalversion (1 of 1 file). Show all

Unified · Split

scripts/setlocalversion+1−0
@@ -16,6 +16,7 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then · 15 unmodified lines
1616 fi
1717
1818 # Are there uncommitted changes?
19+ git update-index --refresh --unmerged > /dev/null
1920 if git diff-index HEAD | read dummy; then
2021 printf '%s' -dirty
2122 fi