Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

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

From: Brian Ericson <hidden>
Date: 2016-06-15 22:45:12

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help