Commit:     4e7434ff028c4280bed620f28fdbf9f4d77d77ce
Parent:     d882421f4e08ddf0a94245cdbe516db260aa6f41
Author:     Theodore Ts'o <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 2 21:53:00 2007 -0400
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 23:14:37 2008 +0100

    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: "Theodore Ts'o" <[EMAIL PROTECTED]>
    Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
 scripts/setlocalversion |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 1b31da8..acce8eb 100644
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -16,6 +16,7 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
        # Are there uncommitted changes?
+       git update-index --refresh --unmerged > /dev/null
        if git diff-index HEAD | read dummy; then
                printf '%s' -dirty
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to