Thread (21 messages) flat view 21 messages, 7 authors, 2016-06-15

Re: [HALF A PATCH] Teach the '--exclude' option to 'diff --no-index'

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:46:15

Hi,

On Fri, 20 Feb 2009, Jakub Narebski wrote:
Johannes Schindelin [off-list ref] writes:
quoted
On Fri, 20 Feb 2009, Jeff King wrote:
quoted
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::.
Thanks for the clarification!

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help