Re: teach git diff -v/--invert-match?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 22, 2008, 21:44 UTC
- Message-ID
- <7vmyj47mil.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080822214208.GA4498@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> On Fri, Aug 22, 2008 at 04:29:31PM -0500, Brian Ericson wrote: > >> I was just working on a reply to my own email as I realized it was >> only dumb-luck that converted 1200 noisy changes into a couple of >> dozen. "-S" matches only the string itself, not the line the string >> resides on. So, -Sxyz will match if "xyz" itself was added or >> deleted in the diff (if "xyz" is on a line that's changed but did not >> itself change, it won't match). Funny that I actually knew this -- I >> use it to look for System.out.println additions among other things. > > Yes (though I couldn't have told you that without experimenting -- I > always assumed it checked whole lines).
The -Sstring counts the number of 'string' in preimage and postimage and skips the commit if they are the same. Nothing more.