diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-06-17 10:59:01 +0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-06-17 10:59:10 +0400 |
| commit | cc4949e1fdade5d063e9f8783cf0e2cc92041ce5 (patch) | |
| tree | 4023bd641bfe464efbde518fb504d6865c9df014 /scripts/setlocalversion | |
| parent | 28b4868820a56de661f54742ff91b78e12f1e582 (diff) | |
| parent | 300df7dc89cc276377fc020704e34875d5c473b6 (diff) | |
| download | linux-cc4949e1fdade5d063e9f8783cf0e2cc92041ce5.tar.xz | |
Merge branch 'linus' into x86/urgent
Merge reason: pull in latest to fix a bug in it.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts/setlocalversion')
| -rwxr-xr-x | scripts/setlocalversion | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 00790472f641..46989b88d734 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 |
