[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1267818271-23154-2-git-send-email-paulmck@linux.vnet.ibm.com>
Date: Fri, 5 Mar 2010 11:44:31 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org
Cc: zippel@...ux-m68k.org, mingo@...e.hu, akpm@...ux-foundation.org,
torvalds@...ux-foundation.org, geert@...ux-m68k.org,
elendil@...net.nl, cloos@...loos.com,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 2/2] kconfig: make setlocalversion -dirty check optional
The git commands that check for uncommitted changes can be quite
expensive, so this patch introduces an environment variable named
KBUILD_CONFIG_NO_CHECK_DIRTY to control these checks for git.
If KBUILD_CONFIG_NO_CHECK_DIRTY is unset or is set to an empty
string, the dirty checks are performed (the default). Otherwise,
KBUILD_CONFIG_NO_CHECK_DIRTY is set to some non-empty string, and the
dirty checks are omitted.
Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
---
scripts/setlocalversion | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 46989b8..3d4ff84 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -39,13 +39,16 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
printf -- '-svn%s' "`git svn find-rev $head`"
fi
- # Update index only on r/w media
- [ -w . ] && git update-index --refresh --unmerged > /dev/null
-
- # Check for uncommitted changes
- if git diff-index --name-only HEAD | grep -v "^scripts/package" \
- | read dummy; then
- printf '%s' -dirty
+ if [ -z "$KBUILD_CONFIG_NO_CHECK_DIRTY" ]; then
+ # Update index only on r/w media
+ [ -w . ] && git update-index --refresh --unmerged > /dev/null
+
+ # Check for uncommitted changes
+ if git diff-index --name-only HEAD \
+ | grep -v "^scripts/package" \
+ | read dummy; then
+ printf '%s' -dirty
+ fi
fi
# All done with git
--
1.6.6
--
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