meld icon indicating copy to clipboard operation
meld copied to clipboard

[Doc] OSX mergetool cmd

Open LukasDrude opened this issue 6 years ago • 6 comments

I followed [1] and tried to use the recommendation how to set up Meld as a git mergetool in OSX.

However, the current path is missing in the cmd.

I was unable to find the code for the webpage [1] to be able to file a pull request to update it. So this is how the cmd in ~/.gitconfig should look like:

[merge]
        tool = meld
[mergetool "meld"]
  trustExitCode = true
  cmd = open -W -a Meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"

(edited)

LukasDrude avatar Mar 09 '18 09:03 LukasDrude

Seems to also need --output=\"$MERGED\" -> --output=\"$PWD/$MERGED\" for me.

sumpfork avatar Mar 11 '18 05:03 sumpfork

Yes, indeed. I'll edit it.

LukasDrude avatar Mar 11 '18 09:03 LukasDrude

Looks like the diff line should be also updated:

[difftool "meld"] trustExitCode = true cmd = open -W -a Meld --args "$LOCAL" "$PWD/$REMOTE"

andrepintorj avatar Apr 17 '18 16:04 andrepintorj

The latest version https://github.com/yousseb/meld/releases/tag/osx-13 Should now be exactly as the Linux version. I was finally able to get rid of the wrapper script.

yousseb avatar Dec 16 '18 17:12 yousseb

Thank you for the latest update. This is how my ~/.gitconfig has to look like after the update (only meld related part):

[diff]
        tool = meld
[difftool]
        prompt = false
[difftool "meld"]
        trustExitCode = true
        cmd = open -W -a Meld --args \"$PWD/$LOCAL\" \"$PWD/$REMOTE\"
[merge]
        tool = meld
[mergetool]
        prompt = false
[mergetool "meld"]
        trustExitCode = true
        cmd = open -W -a Meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"

LukasDrude avatar Dec 17 '18 07:12 LukasDrude

@LukasDrude perfect that helped!

@yousseb ... maybe instead of having stale instructions you can direct the readers of https://yousseb.github.io/meld/ to the README here and have @LukasDrude's correct writeup for the gitconfig on the README? That way, in case there are future changes or improvements we can contribute with fixing the doc for you

KjellKod avatar Feb 14 '19 16:02 KjellKod