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

Re: [PATCH] Disown ssh+git and git+ssh

From
Jeff King <peff@peff.net>
Date
Feb 12, 2016, 18:40 UTC
Message-ID
<20160212184023.GD19973@sigill.intra.peff.net>
In-Reply-To
<1455289777-186690-1-git-send-email-cmn@dwim.me>
On Fri, Feb 12, 2016 at 04:09:37PM +0100, Carlos Martín Nieto wrote:
> These were silly from the beginning, but we have to support them for
> compatibility. That doesn't mean we have to show them in the
> documentation. These were already left out of the main list, but a
> reference in the main manpage was left, so remove that.

Yeah, that reference was added by me to try to be thorough, but I think mentioning ssh:// (as you do here) accomplishes the same goal in a better way.

> Also add a note to discourage their use if anybody goes looking for them
> in the source code.
Sounds like a good plan.
Show 15 quoted lines
> diff --git a/transport.c b/transport.c
> index 9ae7184..f5ae707 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -1002,6 +1002,10 @@ struct transport *transport_get(struct remote *remote, const char *url)
>  		|| starts_with(url, "file://")
>  		|| starts_with(url, "git://")
>  		|| starts_with(url, "ssh://")
> +		/*
> +		 * These ssh schemes remain supported for compat but are
> +		 * undocumented and their use is discouraged
> +		 */
>  		|| starts_with(url, "git+ssh://")
>  		|| starts_with(url, "ssh+git://")) {
>  		/*

Breaking apart an ||-chain with a comment like this is a little odd, but I think the result is reasonably readable, so it's probably OK.

The rest of the patch is obviously correct. Thanks for following up on the earlier discussion.

-Peff
Previous: Carlos Martín NietoNext: Junio C Hamano
Message 2 of 8 in “Disown ssh+git and git+ssh”
  1. Disown ssh+git and git+sshCarlos Martín Nieto, Feb 12, 2016
  2. Jeff KingFeb 12, 2016
  3. Junio C HamanoFeb 13, 2016
  4. Disown ssh+git and git+sshCarlos Martín Nieto, Feb 15, 2016
  5. Eric SunshineFeb 15, 2016
  6. Junio C HamanoMar 9, 2016
  7. Eric SunshineMar 10, 2016
  8. Carlos Martín NietoMar 24, 2016

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.