title: How should a mergetool indicate success of a merge?
body: <p>I'm writing a program to be able to merge custom binary files. I want to let Git trust the exit code of my program, but it seems badly documented which exit codes do indicate a success.</p>
  
  <p>The doc for <a href="https://git-scm.com/docs/git-mergetool#Documentation/git-mergetool.txt--tlttoolgt" rel="nofollow noreferrer">git-mergetool</a> states:</p>
  
  <blockquote>
    <p>If the custom merge tool correctly indicates the success of a merge
    resolution with its exit code, then the configuration variable
    <code>mergetool.&lt;tool&gt;.trustExitCode</code> can be set to <code>true</code>. Otherwise, git
    mergetool will prompt the user to indicate the success of the
    resolution after the custom tool has exited.</p>
  </blockquote>
  
  <p>But this doesn't tell me which exit codes to use for which case.
  Any ideas?</p>