Git does not support tortoisemerge as a difftool

33 views
Skip to first unread message

gerhard...@gmail.com

unread,
Jul 17, 2020, 5:04:58 AM7/17/20
to tortoisegit-users
This is _not_ an issue in TortoiseGit but in Git itself.
It affects using difftools from the command line (or from other tools) only.
Before submitting a PR for Git, I would like to know the if there is a reason for the Git setup.
I have found surprisingly few reports about this, this can maybe serve as a reference.
As a user, it is hard to find where the problem is, if it is a limitation in ToroiseGit or not.

Git supports tortoisemerge as a built in mergetool. If Git finds tortoisegitmerge.exe (or tortoisemerge.exe for compatibility with TortoiseSVN), Git knows the options.
However, as a difftool, you get the following response:

$ git difftool                                              
error: 'tortoisemerge' can only be used to resolve merges  

https://github.com/git-for-windows/git/blob/main/mergetools/tortoisemerge#L2

This file is read as the toolname matches a built-in tool, regardless if the tool is manually configured
https://github.com/git-for-windows/git/blob/main/git-mergetool--lib.sh#L182

The workaround is to create a custom tool (with any other name, 'tortoisemerge' is the only tool known by Git that blocks diff).


Is there any history that blocks tortoisegitmerge (or tortoisemerge) as a difftool that anyone knows about?

This should be patched in Git, but I expect there to be questions from Git maintainers.


/Gerhard

Reply all
Reply to author
Forward
0 new messages