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

Re: difftool sends malformed path to exernal tool on Windows

From
David Aguilar <davvid@gmail.com>
Date
Mar 3, 2014, 00:35 UTC
Message-ID
<CAJDDKr751=c2AOBfjbg2_im6UCBvwWSVjJ7QX8=76vXMsLSw4g@mail.gmail.com>
In-Reply-To
<000801cf317f$ac1be2b0$0453a810$@lsst.org>
On Mon, Feb 24, 2014 at 8:44 AM, Paul Lotz <plotz@lsst.org> wrote:
Show 13 quoted lines
> David,
>
> Thanks for the helpful reply.
>
> As you suggested, I modified the .gitconfig file to have:
> [difftool "test"]
>         cmd = echo \"$LOCAL\" \"$REMOTE\"
>
> and ran
> $ git difftool -t test
>
> An example of the the resulting console output is:
> C:/Users/Paul/AppData/Local/Temp/I8L2Bc_WriteTestParameters.vi Commands/StartAutomatedTest/WriteTestParameters.vi
Hmm. That's interesting.
The next test: replace "echo" with "cat".
Are the contents of both files printed?
If so, then the next thing to try is running:
LVCompare.exe [same paths printed by echo]
and then seeing if it does the right thing.
Could it be that LVCompare.exe is getting tripped up by the forward slashes?

I'm not familiar enough with how msysgit mangles paths before launching programs. It may be that the C:/foo/bar/baz path is getting manged (that's my current guess), but I really don't know.

Another tip I've read online is that launching git via "cmd.exe" may avoid the path mangling. Sorry I'm not more helpful in this area.

Another workaround you can do is to place a shell script wrapper around LVCompare.exe that replaces C:\/ with / and then launches the real LVCompare.exe; that's a workaround, but it could work.

I hope that helps shed some light on what may be going on.
-- 
David
Previous: Paul LotzNext: Paul Lotz
Message 4 of 10 in “difftool sends malformed path to exernal tool on Windows”
  1. Paul LotzFeb 17, 2014
  2. David AguilarFeb 21, 2014
  3. Paul LotzFeb 24, 2014
  4. David AguilarMar 3, 2014
  5. Paul LotzMar 3, 2014
  6. David AguilarMar 5, 2014
  7. Paul LotzMar 5, 2014
  8. Paul LotzMar 7, 2014
  9. David AguilarMar 16, 2014
  10. Paul LotzFeb 28, 2014

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.