Re: [HALF A PATCH] Teach the '--exclude' option to 'diff --no-index'
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 14 quoted lines
> On Fri, 20 Feb 2009, Jeff King wrote:
>
> > But more seriously, how would a user expect this to interact with
> > .gitignore? I know gitignore is about ignoring untracked files, but I
> > can't help but feel the two have something in common. But maybe not. I'm
> > sick today and my brain is not working very well.
>
> I think that the -x option with regular (not --no-index) diff would be
> a little different. .gitignore is for "git add" time, while "git diff"
> happily ignores .gitignore.
>
> Besides, the -x option only works on the basenames (as I implemented it;
> no idea if GNU diff works the same way, but from Michael's patch it looks
> like it does).
Info: (diff.info.gz)diff Options
`-x PATTERN'
`--exclude=PATTERN'
When comparing directories, ignore files and subdirectories whose
basenames match PATTERN. *Note Comparing Directories::.`-X FILE'
`--exclude-from=FILE'
When comparing directories, ignore files and subdirectories whose
basenames match any pattern contained in FILE. *Note Comparing
Directories::.--
Jakub Narebski
Poland
ShadeHawk on #git