summaryrefslogtreecommitdiffstats
path: root/scripts/setlocalversion
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@gmail.com>2009-06-15 15:50:49 +0200
committerVegard Nossum <vegard.nossum@gmail.com>2009-06-15 15:50:49 +0200
commit722f2a6c87f34ee0fd0130a8cf45f81e0705594a (patch)
tree50b054df34d2731eb0ba0cf1a6c27e43e7eed428 /scripts/setlocalversion
parent7a0aeb14e18ad59394bd9bbc6e57fb345819e748 (diff)
parent45e3e1935e2857c54783291107d33323b3ef33c8 (diff)
downloadkernel-crypto-722f2a6c87f34ee0fd0130a8cf45f81e0705594a.tar.gz
kernel-crypto-722f2a6c87f34ee0fd0130a8cf45f81e0705594a.tar.xz
kernel-crypto-722f2a6c87f34ee0fd0130a8cf45f81e0705594a.zip
Merge commit 'linus/master' into HEAD
Conflicts: MAINTAINERS Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-xscripts/setlocalversion6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 00790472f64..46989b88d73 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -39,8 +39,10 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
printf -- '-svn%s' "`git svn find-rev $head`"
fi
- # Are there uncommitted changes?
- git update-index --refresh --unmerged > /dev/null
+ # 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