1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-19 12:53:50 +02:00

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>
This commit is contained in:
David Aguilar 2019-04-04 00:34:38 -07:00 committed by Junio C Hamano
parent 041f5ea1cf
commit eb12adc74c
2 changed files with 13 additions and 0 deletions

View File

@ -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*)

12
mergetools/smerge Normal file
View File

@ -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
}