From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756574AbYIPD1H (ORCPT ); Mon, 15 Sep 2008 23:27:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753997AbYIPD0y (ORCPT ); Mon, 15 Sep 2008 23:26:54 -0400 Received: from ti-out-0910.google.com ([209.85.142.186]:14602 "EHLO ti-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753883AbYIPD0x (ORCPT ); Mon, 15 Sep 2008 23:26:53 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent:sender; b=PG6/7vGf2k532Ao/G64KMeBC6WDXtq9Ecj9cw2Hw5uIgRMaT1bGiHWAdww1y80yqKl 3nJPX2cOIsZpEB9AsTlTYgei2Gky3IbxNSwHctOjcgp/m0pif4U35w7nhX2Pu2iK5Hdx Yv0BpCTfLVfENdOcEf9jt8FIrKbVJ5S7pjxAk= Date: Tue, 16 Sep 2008 06:26:20 +0300 From: Eduard - Gabriel Munteanu To: Randy Dunlap Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Uwe.Kleine-Koenig@digi.com, daniel@danielguilak.com, den@openvz.org, efault@gmx.de, etienne_lorrain@yahoo.fr, sam@ravnborg.org, tglx@linutronix.de, willy@linux.intel.com, torvalds@linux-foundation.org, adobriyan@gmail.com, kai.extern@googlemail.com, eduard.munteanu@linux360.ro Subject: Re: [RFC PATCH] Script for generating Documentation/dontdiff from .gitignore files. (was Re: [RFC/PATCH] dontdiff: generate from gitignore) Message-ID: <20080916032620.GA5188@localhost> References: <7af24c80809121332s5747b4favdfd7adb187d4e73a@mail.gmail.com> <20080915083407.3fd8e9b7.randy.dunlap@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080915083407.3fd8e9b7.randy.dunlap@oracle.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 15, 2008 at 08:34:07AM -0700, Randy Dunlap wrote: > On Sun, 14 Sep 2008 21:23:57 +0300 Eduard - Gabriel Munteanu wrote: > > > .gitignore files get more testing than Documentation/dontdiff, since most > > developers follow Git workflow when sending patches. The latter tends to > > stay outdated and needs to be synchronized every now and then. This patch > > provides a script that scans all .gitignore files and generates a > > Documentation/dontdiff to stdout. > > > > Signed-off-by: Eduard - Gabriel Munteanu > > Hi, > You probably missed (& should read) this thread: > http://lkml.org/lkml/2008/9/12/154 > > Thanks, it makes sense. It seems like diff can't handle such scenarios at all. I suppose Linux should supply its own diff tool (which uses regular diff, but implements proper file matching). Maybe git-diff alone could be included in the tarballs, I'll look into it. Cheers, Eduard > > --- > > scripts/gen_dontdiff.sh | 21 +++++++++++++++++++++ > > 1 files changed, 21 insertions(+), 0 deletions(-) > > create mode 100755 scripts/gen_dontdiff.sh > > > > diff --git a/scripts/gen_dontdiff.sh b/scripts/gen_dontdiff.sh > > new file mode 100755 > > index 0000000..cd94747 > > --- /dev/null > > +++ b/scripts/gen_dontdiff.sh > > @@ -0,0 +1,21 @@ > > +#!/bin/bash > > + > > +# Copyright (C) 2008 Eduard - Gabriel Munteanu > > +# > > +# This file is released under GPL version 2. > > + > > +echo "### Generated by gen_dontdiff.sh ###" > > + > > +grep -Ev "^([[:space:]]*[[#]]*|$)" .gitignore > > + > > +find . -mindepth 2 -name .gitignore | sed -e "s/^\.\///g" | while read FILE > > +do > > + CURR_DIR=`echo "$FILE" | sed -e "s/\.gitignore$//g"` > > + echo "# $FILE" > > + grep -Ev "^([[:space:]]*[[#]]*|$)" $FILE | while read LINE > > + do > > + echo $CURR_DIR$LINE > > + done > > + echo "" > > +done > > + > > -- > > --- > ~Randy > Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA > http://linuxplumbersconf.org/