Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764344AbZFNUsH (ORCPT ); Sun, 14 Jun 2009 16:48:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764233AbZFNUrq (ORCPT ); Sun, 14 Jun 2009 16:47:46 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:50478 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762323AbZFNUrp (ORCPT ); Sun, 14 Jun 2009 16:47:45 -0400 Date: Sun, 14 Jun 2009 13:46:48 -0700 (PDT) From: Christian Kujau To: Sam Ravnborg cc: Nico Schottelius , LKML , Andrew Morton Subject: Re: [PATCH] scripts/setlocalversion on readonly source In-Reply-To: <20090614202704.GA3050@uranus.ravnborg.org> Message-ID: References: <20090611153332.d168e58e.akpm@linux-foundation.org> <20090612043922.GA13001@uranus.ravnborg.org> <20090612075952.GA22436@ikn.schottelius.org> <20090614202704.GA3050@uranus.ravnborg.org> User-Agent: Alpine 2.01 (DEB 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Provags-ID: V01U2FsdGVkX1/GGv3U1aoRSv5UT8j+IrLWgBtnfcxqUzigtoo hqmjxJKQoekQBh+z+tjMOFLZjWIazhyHPdJ9UB7o1N+H+qf4p9 ooN89Uzau8OnJGS41r4uQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1472 Lines: 43 On Sun, 14 Jun 2009, Sam Ravnborg wrote: > > Do not update index on read only media. > > Idea published by Christian Kujau . > > > > 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. I'm not sure if we want to have patches w/o a signoff in the tree; but I could only add a Tested-by: Christian Kujau since it's Nico's patch now. Thanks, Christian. -- BOFH excuse #446: Mailer-daemon is busy burning your message in hell. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/