Skip to content

Commit 6b77283

Browse files
alexhenriegitster
authored andcommitted
mergetools: vscode: new tool
VSCode has supported three-way merges since 2022, see <microsoft/vscode#5770 (comment)>. 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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4590f2e commit 6b77283

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

mergetools/vscode

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
}

0 commit comments

Comments
 (0)