summaryrefslogtreecommitdiff
path: root/mergetools
diff options
context:
space:
mode:
authorStefan Saasen <ssaasen@atlassian.com>2013-10-12 22:29:35 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2013-10-13 23:00:57 (GMT)
commitc5f424fd014488bd8a92b97f52bfe47823bc2128 (patch)
tree56bc7d54267bfe09027c8f6771d176bf02e346fb /mergetools
parent22bbddeafe5d5285def3dda76b300efd1363db1e (diff)
downloadgit-c5f424fd014488bd8a92b97f52bfe47823bc2128.zip
git-c5f424fd014488bd8a92b97f52bfe47823bc2128.tar.gz
git-c5f424fd014488bd8a92b97f52bfe47823bc2128.tar.bz2
mergetools/diffmerge: support DiffMerge as a git mergetool
DiffMerge is a non-free (but gratis) tool that supports OS X, Windows and Linux. See http://www.sourcegear.com/diffmerge/ DiffMerge includes a script `/usr/bin/diffmerge` that can be used to launch the graphical compare tool. This change adds mergetool support for DiffMerge and adds 'diffmerge' as an option to the mergetool help. Signed-off-by: Stefan Saasen <ssaasen@atlassian.com> Acked-by: David Aguilar <davvid@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'mergetools')
-rw-r--r--mergetools/diffmerge15
1 files changed, 15 insertions, 0 deletions
diff --git a/mergetools/diffmerge b/mergetools/diffmerge
new file mode 100644
index 0000000..85ac720
--- /dev/null
+++ b/mergetools/diffmerge
@@ -0,0 +1,15 @@
+diff_cmd () {
+ "$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
+}
+
+merge_cmd () {
+ if $base_present
+ then
+ "$merge_tool_path" --merge --result="$MERGED" \
+ "$LOCAL" "$BASE" "$REMOTE"
+ else
+ "$merge_tool_path" --merge \
+ --result="$MERGED" "$LOCAL" "$REMOTE"
+ fi
+ status=$?
+}