Browse Source

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>
maint
David Aguilar 6 years ago committed by Junio C Hamano
parent
commit
eb12adc74c
  1. 1
      git-mergetool--lib.sh
  2. 12
      mergetools/smerge

1
git-mergetool--lib.sh

@ -279,6 +279,7 @@ list_merge_tool_candidates () {
fi fi
tools="$tools gvimdiff diffuse diffmerge ecmerge" tools="$tools gvimdiff diffuse diffmerge ecmerge"
tools="$tools p4merge araxis bc codecompare" tools="$tools p4merge araxis bc codecompare"
tools="$tools smerge"
fi fi
case "${VISUAL:-$EDITOR}" in case "${VISUAL:-$EDITOR}" in
*vim*) *vim*)

12
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
}
Loading…
Cancel
Save