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

Re: Excluding files from git-diff

From
Jeff King <peff@peff.net>
Date
Oct 18, 2008, 16:14 UTC
Message-ID
<20081018161424.GC20185@coredump.intra.peff.net>
In-Reply-To
<48FA0A17.9050506@pflanze.mine.nu>
On Sat, Oct 18, 2008 at 06:08:55PM +0200, Christian Jaeger wrote:
> The problem with this is that it won't show files that aren't there  
> anymore but have been previously; in general, for that to work (also with 

Yes, you're right. You really do want to be telling git not "here is the list of files I care about" but "I really care about anything _except_ this set".

And I don't think that is currently possible, so a patch would be necessary (and I think is justified, since there is no other way to do it).

The most flexible thing would be the ability to say "I want these paths (or all paths), and exclude these paths" (sort of like we already do for commits). But defining a good command-line syntax for that would probably be painful, and I really think the only sane use case is "I want all paths except for these". In which case your "--invert-match" seems like a good route.

-Peff
Previous: Christian JaegerNext: Jeff King
Message 10 of 12 in “Excluding files from git-diff”
  1. Erik HahnOct 17, 2008
  2. Raphael ZimmererOct 17, 2008
  3. Johannes SchindelinOct 17, 2008
  4. Michael J GruberOct 17, 2008
  5. Christian JaegerOct 17, 2008
  6. Eric RaibleOct 17, 2008
  7. Christian JaegerOct 18, 2008
  8. Jeff KingOct 18, 2008
  9. Christian JaegerOct 18, 2008
  10. Jeff KingOct 18, 2008
  11. Jeff KingOct 18, 2008
  12. Anders MelchiorsenOct 17, 2008

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.