From: Junio C Hamano Date: Fri, 20 Feb 2009 16:34:15 GMT Subject: Re: [HALF A PATCH] Teach the '--exclude' option to 'diff --no-index' Message-ID: <7v1vttt6d4.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: > With this patch, it is possible to exclude files based on basename > patterns. Example: > > $ git diff --no-index -x Makefile -x Makefile.in a/ b/ > > In this example, the recursive diff between a/ and b/ will be shown > modulo changes in files named 'Makefile' or 'Makefile.in'. > > Signed-off-by: Johannes Schindelin > --- > > Michael wrote: > > > I can't think offhand of a more portable tool that could replace > > "diff -r -x" here (suggestions, anyone?). > > Maybe something like this? I agree that diff_options is the logical way to hook this information and diff_opt_parse() is the right place to add this, but why isn't this done at diff_{addremove,change,unmerge}() layer? That way you should be able to cover both no-index special case and the normal diffs, no?