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

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

 



On Mon, Feb 15, 2016 at 9:29 AM, Carlos Martín Nieto <cmn@xxxxxxx> wrote:
> These were silly from the beginning, but we have to support them for

It might be helpful to cite some reference to support the claim that
they are "silly" since it's not necessarily obvious to readers who did
not following the discussion.

More below...

> 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.
>
> Also add a note to discourage their use if anybody goes looking for them
> in the source code.
>
> Signed-off-by: Carlos Martín Nieto <cmn@xxxxxxx>
> ---
>         if (!strcmp(name, "git"))
>                 return PROTO_GIT;
> +       /*
> +        * These ways to spell the ssh transport remain supported for
> +        * compat but are undocumented and their use is discouraged
> +        */
>         if (!strcmp(name, "git+ssh"))
>                 return PROTO_SSH;
>         if (!strcmp(name, "ssh+git"))
> @@ -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 ways to spell the ssh transport remain supported for
> +                * compat but are undocumented and their use is discouraged
> +                */
>                 || starts_with(url, "git+ssh://")
>                 || starts_with(url, "ssh+git://")) {

A little "comment" bikeshedding: Aside from undesirably interrupting
the code flow, these large comment blocks draw far too much attention
from the reader than these deprecated spellings of "ssh" deserve, thus
making them seem overly important. How about minimizing their
importance by giving them minimal commentary?

    || starts_with(url, "ssh://")
    || starts_with(url, "git+ssh://") /* deprecated */
    || starts_with(url, "ssh+git://") { /* deprecated */

The term "deprecated" should be sufficient to explain that their use
is discouraged and why they are not documented anymore, and if a
reader wants to know more, the commit message can be consulted for the
full story.
--
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]