SourceTree / Kaleidoscope mergetool behavior broken

For the last several months there has been a problem with the integration between SourceTree and Kaleidoscope. This is not the launching problem with 2.2.* – Kaleidoscope is launching correctly. What happens is this:

  • Kaleidoscope integrations are set up: ksdiff & git difftool/mergetools
  • SourceTree is set to use Kaleidoscope as its difftool & mergetool
  • Have a file with merge conflicts
  • Launch external merge tool from SourceTree to resolve the conflicts
  • Make changes in Kaleidoscope & save
  • (check the files on disk and note that Kaleidoscope has saved the changes to the file correctly)
  • Quit Kaleidoscope
  • SourceTree cleans up the temporary files and returns the conflicted file to its previous unedited state with conflict markers

Configuring SourceTree to use FileMerge as the difftool/mergetool works fine.

Any ideas how to fix this? Thanks!



1 answer

SourceTree sets up the .gitconfig file with this entry for Kaleidoscope:

[mergetool "sourcetree"]
    cmd = /usr/local/bin/ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
    trustExitCode = true


But it appears that ksdiff's exit code cannot be trusted. Changing the entry to the following makes everything work fine.

[mergetool "sourcetree"]
	cmd = /usr/local/bin/ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
	trustExitCode = false

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

966 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you