* [PATCH 1/2] mergetools: add support for smerge (Sublime Merge)
@ 2019-04-04 7:34 David Aguilar
2019-04-04 7:34 ` [PATCH 2/2] contrib/completion: add smerge to the mergetool completion candidates David Aguilar
0 siblings, 1 reply; 2+ messages in thread
From: David Aguilar @ 2019-04-04 7:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git ML
Teach difftool and mergetool about the Sublime Merge "smerge" command.
Signed-off-by: David Aguilar <davvid@gmail.com>
---
git-mergetool--lib.sh | 1 +
mergetools/smerge | 12 ++++++++++++
2 files changed, 13 insertions(+)
create mode 100644 mergetools/smerge
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 83bf52494c..aaa4eed0bc 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -279,6 +279,7 @@ list_merge_tool_candidates () {
fi
tools="$tools gvimdiff diffuse diffmerge ecmerge"
tools="$tools p4merge araxis bc codecompare"
+ tools="$tools smerge"
fi
case "${VISUAL:-$EDITOR}" in
*vim*)
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
+}
--
2.21.0.198.gfad8868f4e
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] contrib/completion: add smerge to the mergetool completion candidates
2019-04-04 7:34 [PATCH 1/2] mergetools: add support for smerge (Sublime Merge) David Aguilar
@ 2019-04-04 7:34 ` David Aguilar
0 siblings, 0 replies; 2+ messages in thread
From: David Aguilar @ 2019-04-04 7:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git ML
Signed-off-by: David Aguilar <davvid@gmail.com>
---
contrib/completion/git-completion.bash | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 976e4a6548..b6d69bcaeb 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1501,7 +1501,8 @@ _git_diff ()
}
__git_mergetools_common="diffuse diffmerge ecmerge emerge kdiff3 meld opendiff
- tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc codecompare
+ tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc
+ codecompare smerge
"
_git_difftool ()
--
2.21.0.198.gfad8868f4e
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-04 7:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-04 7:34 [PATCH 1/2] mergetools: add support for smerge (Sublime Merge) David Aguilar
2019-04-04 7:34 ` [PATCH 2/2] contrib/completion: add smerge to the mergetool completion candidates David Aguilar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.