yousseb / meld

Meld for macOS
https://yousseb.github.io/meld/
GNU General Public License v2.0
2.28k stars 120 forks source link

[Doc] OSX mergetool cmd #61

Open LukasDrude opened 6 years ago

LukasDrude commented 6 years ago

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)

sumpfork commented 6 years ago

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

LukasDrude commented 6 years ago

Yes, indeed. I'll edit it.

andrepintorj commented 6 years ago

Looks like the diff line should be also updated:

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

yousseb commented 5 years ago

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.

LukasDrude commented 5 years ago

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\"
KjellKod commented 5 years ago

@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