Within the last week or two, SourceTree lost the ability to open the "External diff" tool: when I select External diff (or hit Ctrl-D), it no longer opens the external diff tool. Has anyone else seen this as well and/or does anyone have any pointers for how I might fix it?
I'm using Windows 10, SourceTree version 2.4.8.0 (latest, last I checked), and Source Gear's DiffMerge tool (version 4.2.0, which is probably old). I can open DiffMerge directly, even from the command line. Example:
"C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe" local.env local.env.dist
SourceTree is configured to use DiffMerge as the External Diff Tool and as the Merge Tool.
I looked at this Atlassian Community question, but it really seems to be about a different issue. (SourceTree on my computer is already allowed to modify the global git config.)
I tried changing the External Diff option to Custom and manually selecting the DiffMerge executable (C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe), with or without quotes, and passing the $LOCAL and $REMOTE as the parameters in the Arguments field in SourceTree (with quotes and with backslash-escaped quotes).
Any ideas? Thanks.
Hello! Could you do the following:
git {STUFF} difftool -y --tool=sourcetree {SHA}^..{ANOTHER SHA} -- {THE FILE}"
Thanks!
Hi Mike,
Thanks for your input. Yes, that command is showing up. Example:
git -c diff.mnemonicprefix=false -c core.quotepath=false difftool -y --tool=sourcetree 5e3db38^..5e3db38 -- docker-compose.yml
And here's the output:
/mingw64/libexec/git-core/git-mergetool--lib: eval: line 124: unexpected EOF while looking for matching `''
/mingw64/libexec/git-core/git-mergetool--lib: eval: line 125: syntax error: unexpected end of file
Any ideas? Thanks again,
- Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sounds like the git config is corrupt. Open this file:
C:\Users\{USERNAME}\.gitconfig
And look at the values under "difftool". Double check to see if there's anything odd, or if there's a missing ' or "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bingo! Sure enough, the difftool entry in the .gitconfig file had gotten corrupted somehow:
[difftool "sourcetree"]
cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' \"$LOCAL\" \"$REMOTE\"
cmd = 'C:/Program
cmd = 'C:/Program
cmd = 'C:/Program
cmd = '/C:/Program
Removing all but the first entry there fixed the problem. Thank you! It's so nice to have my external diffs back.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.