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

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

 



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.

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]