git/list[1] front-page[2] threads[3] people[4] search[5] about
 

gitk external diff on Windows

From
PSPhillip Susi <phill@thesusis.net>
Date
Mar 2, 2022, 16:27 UTC
Message-ID
<87fso0qphj.fsf@vps.thesusis.net>

I'm running git version 2.28.0.windows.1 on Windows and trying to set it up to run winmerge as the external diff tool. I am pretty sure I used to do this following the instructions here:

https://igorsgames.wordpress.com/2015/05/28/using-winmerge-as-an-external-diff-tool-in-gitk/

When I point gitk to the batch file and try to open the external diff tool, nothing happens. Winmerge does not open, nor do I get an error from gitk. I noticed the next box below on the preferences screen contains "cmd /c" so I tried prefixing the path to the batch file with that, and instead I get an error that says:

cmd /c C:/Program Files/WinMerge/winmerge.bat: command failed: couldn't execute "cmd \c C:\Program Files\WinMerge\winmerge.bat": no such file or directory.

Why does nothing happen in the first case, and why in the second case is gitk apparently changing regular slashes into back-slashes before trying to pass the string directly to CreateProcess as the name of the executable binary, rather than to a shell or ShellExecute or something?

Also I just tried having the batch file echo something to a text file to see if it was running at all or if winmerge just isn't opening, and the text file ( full path to my home directory to make sure permissions aren't a problem ) isn't created, so the batch file isn't executing even though there is no error given by gitk.

Next: Erik Cervin Edin
Message 1 of 3 in “gitk external diff on Windows”
  1. Phillip SusiMar 2, 2022
  2. Erik Cervin EdinMar 4, 2022
  3. Phillip SusiMar 4, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.