Commit a2bb90a0 authored by Nico Schottelius's avatar Nico Schottelius Committed by Sam Ravnborg

kbuild: fix delay in setlocalversion on readonly source

Do not update index on read only media.
Idea published by Christian Kujau <lists@nerdbynature.de>.

Cc: Nico Schottelius <nico@ikn.schottelius.org>
Cc: Christian Kujau <lists@nerdbynature.de>
parent b2d89930
...@@ -39,8 +39,10 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then ...@@ -39,8 +39,10 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
printf -- '-svn%s' "`git svn find-rev $head`" printf -- '-svn%s' "`git svn find-rev $head`"
fi fi
# Are there uncommitted changes? # Update index only on r/w media
git update-index --refresh --unmerged > /dev/null [ -w . ] && git update-index --refresh --unmerged > /dev/null
# Check for uncommitted changes
if git diff-index --name-only HEAD | grep -v "^scripts/package" \ if git diff-index --name-only HEAD | grep -v "^scripts/package" \
| read dummy; then | read dummy; then
printf '%s' -dirty printf '%s' -dirty
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment