lkml.org 
[lkml]   [2009]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scripts/setlocalversion on readonly source
> 
>
> Do not update index on read only media.
> Idea published by Christian Kujau <lists@nerdbynature.de>.
>
> diff --git a/scripts/setlocalversion b/scripts/setlocalversion
> index 0079047..46989b8 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

Please sign-off future patches.
I applied this with no signoff - but this is an exception.

Sam


\
 
 \ /
  Last update: 2009-06-14 22:27    [W:1.493 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site