title: ignoring changes matching a string in git diff
body: <p>I've made a single simple change to a large number of files that are version controlled in git and I'd like to be able to check that no other changes are slipping into this large commit.</p>
  
  <p>The changes are all of the form</p>
  
  <pre><code>-                       "main()",
  +                       OOMPH_CURRENT_FUNCTION,
  </code></pre>
  
  <p>where "main()" could be the name of any function. I want to generate a diff of all changes that are not of this form.</p>
  
  <p>The -G and -S options to git diff are tantalisingly close--they find changes that DO match a string or regexp.</p>
  
  <p>Is there a good way to do this?</p>
  
  <h2>Attempts so far</h2>
  
  <p>Another <a href="https://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word">question</a> describes how regexs can be negated, using this approach I think the command should be</p>
  
  <pre><code>git diff -G '^((?!OOMPH_CURRENT_FUNCTION).)*$'
  </code></pre>
  
  <p>but this just returns the error message</p>
  
  <pre><code>fatal: invalid log-grep regex: Invalid preceding regular expression
  </code></pre>
  
  <p>so I guess git doesn't support this regex feature.</p>
  
  <p>I also noticed that the standard unix diff has the -I option to "ignore changes whose lines all match RE". But I can't find the correct way to replace git's own diff with the unix diff tool.</p>