How to grep the git diff?
Have you tried git diff -S<string>
or git diff -G".*string.*"
? Note that they are not equivalent, see the documentation about pickaxe for what -S does.
Not sure but isn't git diff -G <regex>
flag OK?
-G < regex>
Look for differences whose added or removed line matches the given <regex>.