git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mergetools: add support for VS Code

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 4, 2019, 13:45 UTC
Message-ID
<nycvar.QRO.7.76.6.1906041542050.1775@tvgsbejvaqbjf.bet>
In-Reply-To
<20190603150315.16032-1-wenbei123@gmail.com>
Hi Wen Bei Li,
On Mon, 3 Jun 2019, Wen Bei Li wrote:
> Teach difftool and mergetool about VS Code.
> ---

Even if it is a very short commit message (see e.g. https://github.com/git-for-windows/git/commit/581d2fd9f2d6 for a typical commit message in Git's repository), I think it is okay.

Personally, I would have "lost" a few words about Visual Studio Code and how popular it is, but probably only because I like it so much (and maybe nobody wants to hear about that anymore).

However, in the Git project we do ask for your Sign-off: https://git-scm.com/docs/SubmittingPatches#dco

Show 10 quoted lines
> 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"

Do you also want to add support for `code-insiders`? (That's what I run a lot of the time because it allows me to develop code in my Windows Subsystem for Linux while the GUI runs on Windows.)

Show 16 quoted lines
>  	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"
> +}
This looks good to me!

Thanks, Johannes

Previous: Wen Bei LiNext: Wen Bei Li
Message 2 of 4 in “mergetools: add support for VS Code”
  1. mergetools: add support for VS CodeWen Bei Li, Jun 3, 2019
  2. Johannes SchindelinJun 4, 2019
  3. mergetools: add support for VS CodeWen Bei Li, Jun 4, 2019
  4. Johannes SchindelinJun 5, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.