From: Alex Henrie Date: Mon, 2 Sep 2024 02:59:14 +0000 (-0600) Subject: mergetools: vscode: new tool X-Git-Tag: v2.47.0-rc0~63^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b77283f5e7fffcc74c032f2e692aaab1ddbe58a;p=thirdparty%2Fgit.git mergetools: vscode: new tool VSCode has supported three-way merges since 2022, see . 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 Signed-off-by: Junio C Hamano --- diff --git a/mergetools/vscode b/mergetools/vscode new file mode 100644 index 0000000000..3b39b458d6 --- /dev/null +++ b/mergetools/vscode @@ -0,0 +1,19 @@ +diff_cmd () { + "$merge_tool_path" --wait --diff "$LOCAL" "$REMOTE" +} + +diff_cmd_help () { + echo "Use Visual Studio Code (requires a graphical session)" +} + +merge_cmd () { + "$merge_tool_path" --wait --merge "$REMOTE" "$LOCAL" "$BASE" "$MERGED" +} + +merge_cmd_help () { + echo "Use Visual Studio Code (requires a graphical session)" +} + +translate_merge_tool_path () { + echo code +}