If the custom merge tool correctly indicates the success of a merge resolution with its exit code, then the configuration variable mergetool..trustExitCode can be set to true. Otherwise, git mergetool will prompt the user to indicate the success of the resolution after the custom tool has exited.

Yeah, I'm going to say never set this to true.  I've had a lot of trouble using kdiff3 with SourceTree and git, with kdiff3 saying things merged or SourceTree reading the exit wrong.  I think it's my kdiff3, since I've had at least one flub on the command line.

So rather than have to restart merges or, worse, grab the original merge file and run it through WinMerge or similar, I'm setting this to false every time.  Ask me.  If I'm taking the human time to merge, I can take the human time to say whether it worked.

9  [mergetool "sourcetree"]
10 cmd = /Applications/
\"$LOCAL\" \"$REMOTE\" -ancest
11 trustExitCode = false
12 [apply]
13 whitespace = nowarn
14 [merge]
15 tool = kdiff3

Labels: ,