Skip to content

Instantly share code, notes, and snippets.

@hugosenari
Created August 14, 2012 19:03
Show Gist options
  • Save hugosenari/3351767 to your computer and use it in GitHub Desktop.
Save hugosenari/3351767 to your computer and use it in GitHub Desktop.
Configure Git To use with wimerge (wine)
[merge]
tool = winmerge
[mergetool "winmerge"]
cmd = /home/hugosenari/.bin/winmerge.sh \"$LOCAL\" \"$BASE\" \"$REMOTE\" \"$MERGED\"
trustExitCode = false
keepBackup = false
[mergetool]
prompt = false
#!/bin/sh
# Passing the following parameters to difftool:
# http://jmodalwindow.java.net/manual/dpl/html/version.control.system.html
# LOCAL BASE REMOTE MERGED
localFileName=$1
baseFileName=$2
remoteFileName=$3
mergedFileName=$4
NULL="/dev/null"
echo $@
if [ "$remoteFileName" = "$NULL" ] ; then
echo "removed: $baseFileName"
elif [ "$localFileName" = "$NULL" ] ; then
echo "added: $baseFileName"
else
echo "changed: $baseFileName"
wine /home/hugosenari/.wine/drive_c/Program\ Files\ \(x86\)/WinMerge/WinMergeU.exe -e -u \
-dl "Theirs $remoteFileName" \
-dr "Mine $localFileName" "$remoteFileName" "$localFileName" "$mergedFileName"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment