[PATCH] mergetools: add support for VS Code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Teach difftool and mergetool about VS Code.
---
 git-mergetool--lib.sh | 2 +-
 mergetools/code       | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 mergetools/code

diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 204a5acd66..59512ae673 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -283,7 +283,7 @@ list_merge_tool_candidates () {
 		fi
 		tools="$tools gvimdiff diffuse diffmerge ecmerge"
 		tools="$tools p4merge araxis bc codecompare"
-		tools="$tools smerge"
+		tools="$tools smerge code"
 	fi
 	case "${VISUAL:-$EDITOR}" in
 	*vim*)
diff --git a/mergetools/code b/mergetools/code
new file mode 100644
index 0000000000..566a0d9d63
--- /dev/null
+++ b/mergetools/code
@@ -0,0 +1,7 @@
+diff_cmd () {
+	"$merge_tool_path" --wait --diff "$LOCAL" "$REMOTE"
+}
+
+merge_cmd () {
+	"$merge_tool_path" --wait "$MERGED"
+}
-- 
2.21.0.windows.1




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux