External Diff does not work, any ideas why? Is this a bug?
I'm using SourceTree 3.4.13 on Windows 10 Pro.
On my .gitconfig I have:
[difftool "sourcetree"]
cmd = 'D:/Program Files (x86)/WinMerge/WinMergeU.exe' \"$LOCAL\" \"$REMOTE\"
The path to WinMerge is correct.
And here is the GetExternalDiffProcess process log:
{
"Command": "git\r\n-c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks difftool -y --tool=sourcetree --\r\nAssets/DrestPrototype/Prefabs/UI/Tasks/Game Task.prefab",
"Directory": "D:\\Documents\\Projects\\Droid\\Unity_Prototype",
"Status": "Finished",
"Duration": "00:00:00.0651253",
"CallerContext": "GetExternalDiffProcess",
"Output": "warning: LF will be replaced by CRLF in Assets/DroidPrototype/Prefabs/UI/Tasks/Game Task.prefab.\nThe file will have its original line endings in your working directory\n"
}
The command has break lines and it looks completely wrong.
Has it ever worked for you? I'm on 3.4.14, but it's worked for me since Day 2.
My .gitconfig shows:
[difftool "bc3"]
path = C:/Program Files (x86)/Beyond Compare 3/bcomp.exe
cmd = \"C:/Program Files (x86)/Beyond Compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's why I said it had worked for me since Day 2. I should have also included this definition:
[difftool "sourcetree"]
cmd = 'C:/Program Files (x86)/Beyond Compare 3/BComp.exe' \"$LOCAL\" \"$REMOTE\"
I don't see that it's any different from yours, except a different tool.
Looking at your Process Log, the "--tool=" reference makes me think you need to define your compare tool at the Git level???
I don't remember doing that and I don't use the command line much, so just a WAG.
Good luck.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Stew!
No, it never worked for me, but I'd love to make this work.
Regarding defining the tool at the git level. The log shows up --tool=sourcetree. Isn't it correct?
What I think is the problem are those weird break lines in the command. I don't know if there is a way to remove these break lines in some configuration file.
"Command": "git\r\n-c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks difftool -y --tool=sourcetree --\r\nAssets/DrestPrototype/Prefabs/UI/Tasks/Game Task.prefab"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just found out this other question and I tried to change the single quotes for escaped double quotes on .gitconfig and it worked!
So, instead of
[difftool "sourcetree"]
cmd = 'D:/Program Files (x86)/WinMerge/WinMergeU.exe' \"$LOCAL\" \"$REMOTE\"
I have now
[difftool "sourcetree"]
cmd = \"d:/Program Files (x86)/WinMerge/WinMergeU.exe\" \"$LOCAL\" \"$REMOTE\"
But I have the same problem as Jason in his question. If I open Tools > Options it rewrites .gitconfig and the External Diff command doesn't anymore again. Really annoying!
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.