{"thread":{"id":"57497","subject":"gitk external diff on Windows","startedAt":"2022-03-02T16:47:04Z","lastAt":"2022-03-04T20:51:36Z","messageCount":3,"participants":["Phillip Susi","Erik Cervin Edin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"450113","messageId":"87fso0qphj.fsf@vps.thesusis.net","threadId":"57497","inReplyTo":null,"subject":"gitk external diff on Windows","fromName":"Phillip Susi","fromEmail":"phill@thesusis.net","sentAt":"2022-03-02T16:27:20Z","receivedAt":"2022-03-02T16:47:04Z","isPatch":false,"sender":{"key":"phill@thesusis.net","avatar":null},"body":"I'm running git version 2.28.0.windows.1 on Windows and trying to set it\nup to run winmerge as the external diff tool.  I am pretty sure I used\nto do this following the instructions here:\n\nhttps://igorsgames.wordpress.com/2015/05/28/using-winmerge-as-an-external-diff-tool-in-gitk/\n\nWhen I point gitk to the batch file and try to open the external diff\ntool, nothing happens.  Winmerge does not open, nor do I get an error\nfrom gitk.  I noticed the next box below on the preferences screen\ncontains \"cmd /c\" so I tried prefixing the path to the batch file with\nthat, and instead I get an error that says:\n\ncmd /c C:/Program Files/WinMerge/winmerge.bat: command failed: couldn't\nexecute \"cmd \\c C:\\Program Files\\WinMerge\\winmerge.bat\": no such file or\ndirectory.\n\nWhy does nothing happen in the first case, and why in the second case is\ngitk apparently changing regular slashes into back-slashes before\ntrying to pass the string directly to CreateProcess as the name of the\nexecutable binary, rather than to a shell or ShellExecute or something?\n\nAlso I just tried having the batch file echo something to a text file to\nsee if it was running at all or if winmerge just isn't opening, and the\ntext file ( full path to my home directory to make sure permissions\naren't a problem ) isn't created, so the batch file isn't executing even\nthough there is no error given by gitk.\n"},{"id":"450363","messageId":"CA+JQ7M8SF2cmZ7jagH-VdrZeR9Kfcw0GV=A1fpDeDubwJS1B8g@mail.gmail.com","threadId":"57497","inReplyTo":"87fso0qphj.fsf@vps.thesusis.net","subject":"Re: gitk external diff on Windows","fromName":"Erik Cervin Edin","fromEmail":"erik@cervined.in","sentAt":"2022-03-04T08:37:28Z","receivedAt":"2022-03-04T08:38:49Z","isPatch":false,"sender":{"key":"erik@cervined.in","avatar":null},"body":"On Wed, Mar 2, 2022 at 11:32 PM Phillip Susi <phill@thesusis.net> wrote:\n>\n> I'm running git version 2.28.0.windows.1 on Windows and trying to set it\n> up to run winmerge as the external diff tool.\n\nThis is really a Git for Windows specific issue and more appropriately\nasked here\nhttps://groups.google.com/g/git-for-windows\n\nBut I'll give a quick response here.\n\n> contains \"cmd /c\" so I tried prefixing the path to the batch file with\n> that, and instead I get an error that says:\n>\n> cmd /c C:/Program Files/WinMerge/winmerge.bat: command failed: couldn't\n> execute \"cmd \\c C:\\Program Files\\WinMerge\\winmerge.bat\": no such file or\n> directory.\n\nI'm guessing you're running this from git bash, in which case try\ncmd //c C:/Program Files/WinMerge/winmerge.bat\nSee\nhttps://stackoverflow.com/a/21907301\n\nBasically a song and dance has to be done to work with Windows quirks.\n\nIf you're still having issues, it's best to follow up in the Git for\nWindows discussion group\nhttps://groups.google.com/g/git-for-windows\n"},{"id":"450440","messageId":"877d99bfwp.fsf@vps.thesusis.net","threadId":"57497","inReplyTo":"CA+JQ7M8SF2cmZ7jagH-VdrZeR9Kfcw0GV=A1fpDeDubwJS1B8g@mail.gmail.com","subject":"Re: gitk external diff on Windows","fromName":"Phillip Susi","fromEmail":"phill@thesusis.net","sentAt":"2022-03-04T20:50:24Z","receivedAt":"2022-03-04T20:51:36Z","isPatch":false,"sender":{"key":"phill@thesusis.net","avatar":null},"body":"\nErik Cervin Edin <erik@cervined.in> writes:\n\n> I'm guessing you're running this from git bash, in which case try\n> cmd //c C:/Program Files/WinMerge/winmerge.bat\n> See\n> https://stackoverflow.com/a/21907301\n>\n> Basically a song and dance has to be done to work with Windows quirks.\n>\n> If you're still having issues, it's best to follow up in the Git for\n> Windows discussion group\n> https://groups.google.com/g/git-for-windows\n\nNope, that didn't help.  I guess I'll try there.\n"}]}