6

I'm WSL (Windows Subsystem for Linux) user. I use WSL to simply rsync source code between my host and remote compiling machine (RedHat). I found such a article:

https://www.deptagency.com/en-gb/story/using-meld-as-a-git-merge-tool-on-windows/

which triggers and run GUI windows meld from WSL.

But after following steps from this article, I'm getting this err msg (I've checked if windows EoL were passed):

Traceback (most recent call last): File "bin/meld", line 328, in structured_log_adapter UnicodeDecodeError: 'utf-8' codec can't decode byte 0x93 in position 103: invalid start byte

Do you have any ideas?

Thanks in advance, BR

Sebastian
  • 330
  • 4
  • 9
  • A bug report here:[Meld Windows shows error when git external call it (#222) · Issues · GNOME / meld · GitLab](https://gitlab.gnome.org/GNOME/meld/issues/222), and it looks like a binding error. – ollydbg23 Aug 17 '18 at 02:03

2 Answers2

6

I am not sure if it would answer this question, but I needed to run meld within WSL2. Tried apt install meld but since that it's Windows, it doesn't run GTK app. So what I have done was to simply use symbolic link between Windows version of Meld:

ln -s /mnt/c/Program\ Files\ \(x86\)/Meld/Meld.exe /usr/local/bin/meld

And voila!

Qtax
  • 33,241
  • 9
  • 83
  • 121
Eren Atas
  • 138
  • 1
  • 4
4

Have you tried the current version of Meld https://meldmerge.org/. I have followed the provided link https://www.deptagency.com/en-gb/story/using-meld-as-a-git-merge-tool-on-windows/ without any issues.

Steps in detail

Download and Install meld on Windows 10 from https://meldmerge.org/

Navigate to your wsl terminal Create a script to pass things over to meld

nano meld
#!/bin/bash

/mnt/c/Program\ Files\ \(x86\)/Meld/Meld.exe $@

Make the script executable

sudo chmod +x meld

Move the script to /usr/bin

sudo mv meld /usr/bin

Then, in ~/.gitconfig add/edit the following

[merge]
    tool = meld
[mergetool "meld"]
    cmd = meld --diff \"$BASE\" \"$LOCAL\" \"$REMOTE\" --output \"$MERGED\"

Navigate to git directory that has merge conflicts

Run

git mergetool

Enjoy!

mohjak
  • 101
  • 2
  • 11