summaryrefslogtreecommitdiff
path: root/mergetools
diff options
context:
space:
mode:
authorLibravatar David Aguilar <davvid@gmail.com>2019-04-04 00:34:38 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-04 18:21:25 +0900
commiteb12adc74cf22add318f884072be2071d181abaa (patch)
tree7ed1a9baea8d2cb6a57472b647f1c009fe9c61bc /mergetools
parentThe third batch (diff)
downloadtgif-eb12adc74cf22add318f884072be2071d181abaa.tar.xz
mergetools: add support for smerge (Sublime Merge)
Teach difftool and mergetool about the Sublime Merge "smerge" command. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mergetools')
-rw-r--r--mergetools/smerge12
1 files changed, 12 insertions, 0 deletions
diff --git a/mergetools/smerge b/mergetools/smerge
new file mode 100644
index 0000000000..9c2e6f6fd7
--- /dev/null
+++ b/mergetools/smerge
@@ -0,0 +1,12 @@
+diff_cmd () {
+ "$merge_tool_path" mergetool "$LOCAL" "$REMOTE" -o "$MERGED"
+}
+
+merge_cmd () {
+ if $base_present
+ then
+ "$merge_tool_path" mergetool "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"
+ else
+ "$merge_tool_path" mergetool "$LOCAL" "$REMOTE" -o "$MERGED"
+ fi
+}