Difftool doesn't open, and command line hangs

2.1k Views Asked by At

I have Meld configured as my difftool. I'm pretty sure it's configured correctly, because if I do git config -l, I get

merge.tool=meld
diff.tool=meld
mergetool.meld.path=C:\Program Files (x86)\Meld\Meld.exe
difftool.meld.path=C:\Program Files (x86)\Meld\Meld.exe

The setup is the same to my mergetool, and the mergetool does work correctly.

I'm trying to compare my current files to my last commit. When I do git difftool, the command line says

Viewing (1/9): 'myfile.cs'

But nothing else happens. Meld doesn't open. The command line also appears frozen, and I have to close Powershell.

How do I get the Meld to open correctly?

2

There are 2 best solutions below

0
On

The problem seems to be about how meld is getting shut down.

My PC is a MAC, I have not tried it on Ubuntu yet.

If I start meld via git, e.g.:

git vdiff origin/master...
# where "vdiff" invokes meld
# kill it here with ctrl-C in the terminal

It causes a hang/failure the next start up.

To fix it:

  • make sure it's dead with ctrl-C in the terminal where you started it
  • then rm ~/.local/share/meld/recent-* as shown by Manfred Scheucher.
  • then double-check the directory is empty: ls -al ~/.local/share/meld
  • start it from the icon in the tray, i.e. right click then "Open"
  • it should come up cleanly with no directories etc named
  • then close it cleanly using "Meld", then "Quit Meld" from the menu system
  • then double-check the directory is empty: ls -al ~/.local/share/meld and rm any files that are there.
  • it should come up cleanly and shut down cleanly from the icon tray.

To keep it from recurring:

  • start it up as normal e.g. git vdiff origin/master...
  • DO NOT USE ctrl-C to kill it!
  • close it using the menu system "Meld" | "Quit Meld"

Using this technique, it seems to come up normally for me -- assuming I kill it with the menu (and not ctrl-c)

0
On

I experienced similar issues recently when comparing two (binary) zip files instead of comparing the extracted contents (which are almost similar). I guess the problem occurs if files with too large differences are compared.

By stopping meld and by removing ~/.local/share/meld/recent-* , I managed to get meld running again.