Git fork

mergetools: vscode: new tool

VSCode has supported three-way merges since 2022, see
<https://github.com/microsoft/vscode/issues/5770#issuecomment-1188658476>.

Although the program binary is located at /usr/bin/code, name the
mergetool "vscode" because the word "code" is too generic and would lead
to confusion. The name "vscode" also matches Git's existing
contrib/vscode directory.

On Windows, VSCode adds the directory that contains code.cmd to %PATH%,
so there is no need to invoke mergetool_find_win32_cmd to search for the
program.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Alex Henrie and committed by
Junio C Hamano
6b77283f 4590f2e9

+19
+19
mergetools/vscode
··· 1 + diff_cmd () { 2 + "$merge_tool_path" --wait --diff "$LOCAL" "$REMOTE" 3 + } 4 + 5 + diff_cmd_help () { 6 + echo "Use Visual Studio Code (requires a graphical session)" 7 + } 8 + 9 + merge_cmd () { 10 + "$merge_tool_path" --wait --merge "$REMOTE" "$LOCAL" "$BASE" "$MERGED" 11 + } 12 + 13 + merge_cmd_help () { 14 + echo "Use Visual Studio Code (requires a graphical session)" 15 + } 16 + 17 + translate_merge_tool_path () { 18 + echo code 19 + }