projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2d8993
)
kbuild: fix delay in setlocalversion on readonly source
author
Nico Schottelius
<
[email protected]
>
Fri, 12 Jun 2009 07:59:52 +0000
(09:59 +0200)
committer
Sam Ravnborg
<
[email protected]
>
Sun, 14 Jun 2009 20:26:00 +0000
(22:26 +0200)
Do not update index on read only media.
Idea published by Christian Kujau <
[email protected]
>.
Cc: Nico Schottelius <
[email protected]
>
Cc: Christian Kujau <
[email protected]
>
scripts/setlocalversion
patch
|
blob
|
history
diff --git
a/scripts/setlocalversion
b/scripts/setlocalversion
index 00790472f641b8cd5990033a4162b0120aa1453e..46989b88d7345d233ce5d734e2ed9845784df4d0 100755
(executable)
--- 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