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

teach git diff -v/--invert-match?

From
BEBrian Ericson <bme@visi.com>
Date
Aug 22, 2008, 14:51 UTC
Message-ID
<48AED264.60600@visi.com>

I'm wondering what it would take to teach git diff to invert the -S string (like git grep).

I'm finding git diff -S<string> [--pickaxe-regex] to be really useful, but find I have cases where I want to ignore differences. For example, I might not care if the only changes to a Java file, for example, are related to import statements. I'd like to be able to do something like "git diff -S'^import' --pickaxe-regex -v". I'll admit I can get by with something like "git diff -S'^[^i]' --pickaxe-regex", but am pining for -v/--invert-match.

Next: Jeff King
Message 1 of 7 in “teach git diff -v/--invert-match?”
  1. Brian EricsonAug 22, 2008
  2. Jeff KingAug 22, 2008
  3. Brian EricsonAug 22, 2008
  4. Jeff KingAug 22, 2008
  5. Junio C HamanoAug 22, 2008
  6. Paolo BonziniAug 25, 2008
  7. Jeff KingAug 27, 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.