title: Using OS X FileMerge/opendiff to view git differences, loading all files at once in the directory view
body: <p>We are version controlling our project using git. Developing under OS X, we'd like to use the <em>FileMerge</em> application distributed with the development tools to display git generated differences:<br/>
  If we understood correctly, it is possible to configure its invocation through <code>git difftool</code>.</p>
  
  <hr>
  
  <p>Following advices from different sources, we added this in our global git configuration file:</p>
  
  <pre><code>[diff]
      tool = opendiff
  </code></pre>
  
  <p>It works well for "file by file" diffs. But we prefer to have a directory difference loaded at once in the tool, for which the command is <a href="https://git-scm.com/docs/git-difftool" rel="nofollow noreferrer"><code>git difftool --dir-diff</code></a>.</p>
  
  <p>When invoking the directory diff command, the list of different files in correctly generated, but if we actually try to open one file, both sides show the error <strong>files does not exist</strong>. Apparently, this is because <em>opendiff</em> is terminating almost immediately, thus having git remove the temporary folders on which the comparison occurred.</p>
  
  <p>Following <a href="https://stackoverflow.com/a/29221361/1027706">this answer</a>, we added those lines to our global git configuration file:</p>
  
  <pre><code>[difftool "opendiff"]
      cmd = /usr/bin/opendiff \"$LOCAL\" \"$REMOTE\" -merge \"$MERGED\" | cat
  </code></pre>
  
  <p>But it does not solve the <strong>file does not exist</strong> problem (and <em>opendiff</em> still returns almost immediately).</p>
  
  <p>What would be the correct configuration for this use case ?</p>