Installing Meld as a regular Linux package, it is fairly straighforward to setup Meld as git merge tool, here is an extract of my .gitconfig.
[merge]
tool = meld
[mergetool "meld"]
trustExitCode = true
cmd = meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"
But what about the flatpak version of Meld which you cannot execute simply with the command meld?
I guess the cmd part should be something like
cmd = flatpak run org.gnome.meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"
but this exact command doesn't work. How should it be modified?
After going through this process today, I figured I would share my final working solution for a 3-way merge. It is based on the possible translation from VonC above.
[merge]
tool = meld_flatpak
[mergetool "meld_flatpak"]
cmd = flatpak run --file-forwarding org.gnome.meld \"@@\" $LOCAL \"@@\" \"@@\" $BASE \"@@\" \"@@\" $REMOTE \"@@\" --output \"@@\" $MERGED \"@@\"
[mergetool]
prompt = false
keepBackup = false
writeToTemp = true
Check if this is similar to flatpak issue 1423:
You need the following command:
My
.gitconfig:
[diff]
tool = meld_flatpak
[difftool "meld_flatpak"]
cmd = flatpak run --file-forwarding org.gnome.meld \"@@\" $LOCAL \"@@\" \"@@\" $REMOTE \"@@\"
[difftool]
prompt = false
A possible translation for mergetool (considering the syntax for meld):
cmd = flatpak run --file-forwarding org.gnome.meld $LOCAL \"@@\" $BASE \"@@\" $REMOTE \"@@\" --output=$MERGED \"@@\""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With