title: How can I use M-x rgrep with the git grep command in Emacs?
body: <p>I want to be able to use the normal <code>M-x rgrep</code> workflow (entering a path, a pattern and displaying the linked results in a <code>*grep*</code> buffer) but using <code>git grep</code> instead of the normal <code>find</code> command:</p>
  
  <pre><code>find . -type f -exec grep -nH -e  {} +
  </code></pre>
  
  <p>I tried directly setting the <code>grep-find-command</code> variable:</p>
  
  <pre><code>(setq grep-find-command "git grep")
  </code></pre>
  
  <p>and using <code>grep-apply-setting</code></p>
  
  <pre><code>(grep-apply-setting 'grep-find-command "git grep")
  </code></pre>
  
  <p>but neither seems to work. When I run <code>M-x rgrep</code> it just uses the same <code>find</code> command as before.</p>
  
  <p>In fact, I'm pretty sure now that <code>rgrep</code> doesn't even use the <code>grep-find-command</code> variable, but I can't figure out where it's command <em>is</em> stored.</p>