git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 20, 2009, 18:34 UTC
Message-ID
<m3skm9rm6h.fsf@localhost.localdomain>
In-Reply-To
<alpine.DEB.1.00.0902201555490.6302@intel-tinevez-2-302>
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
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 12 of 24 in “Add more tests of cvsimport”
  1. 0/4 Add more tests of cvsimportMichael Haggerty, Feb 20, 2009
  2. 1/4 Start a library for cvsimport-related testsMichael Haggerty, Feb 20, 2009
  3. 2/4 Use CVS's -f option if available (ignore user's ~/.cvsrc file)Michael Haggerty, Feb 20, 2009
  4. 3/4 Test contents of entire cvsimported "master" tree contentsMichael Haggerty, Feb 20, 2009
  5. 4/4 Add some tests of git-cvsimport's handling of vendor branchesMichael Haggerty, Feb 20, 2009
  6. Jeff KingFeb 20, 2009
  7. Junio C HamanoFeb 20, 2009
  8. Michael HaggertyFeb 20, 2009
  9. Teach the '--exclude' option to 'diff --no-index'Johannes Schindelin, Feb 20, 2009
  10. Jeff KingFeb 20, 2009
  11. Johannes SchindelinFeb 20, 2009
  12. Jakub NarebskiFeb 20, 2009
  13. Johannes SchindelinFeb 20, 2009
  14. Junio C HamanoFeb 20, 2009
  15. Johannes SchindelinFeb 24, 2009
  16. Junio C HamanoFeb 24, 2009
  17. Michael HaggertyFeb 20, 2009
  18. Jeff KingFeb 20, 2009
  19. Samuel Lucas Vaz de MelloFeb 20, 2009
  20. Michael HaggertyFeb 21, 2009
  21. Ferry Huberts (Pelagic)Feb 20, 2009
  22. Michael HaggertyFeb 21, 2009
  23. Ferry Huberts (Pelagic)Feb 21, 2009
  24. Junio C HamanoFeb 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.