[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1194054781-16609-2-git-send-email-tytso@mit.edu>
Date: Fri, 2 Nov 2007 21:53:00 -0400
From: Theodore Ts'o <tytso@....edu>
To: linux-kernel@...r.kernel.org
Cc: Theodore Ts'o <tytso@....edu>
Subject: [PATCH,RFC 2/3] 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 status" will update the index to
avoid these false positives.
Signed-off-by: "Theodore Ts'o" <tytso@....edu>
---
scripts/setlocalversion | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 20711f5..bfc8c8c 100644
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -16,6 +16,7 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
fi
# Are there uncommitted changes?
+ git status >& /dev/null
if git diff-index HEAD | read dummy; then
printf '%s' -dirty
fi
--
1.5.3.4.499.g1104e-dirty
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists