Disown ssh+git and git+ssh
authorCarlos Martín Nieto <cmn@dwim.me>
Mon, 15 Feb 2016 14:29:06 +0000 (15:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Mar 2016 21:54:38 +0000 (13:54 -0800)
Some people argue that these were silly from the beginning (see
http://thread.gmane.org/gmane.comp.version-control.git/285590/focus=285601
for example), 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.

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@dwim.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git.txt
connect.c
transport.c
index d987ad20c90a05932733c09812324c3d176ebbbe..2f90635d5c8263ba6b7d49f2bba5e77e4b78346e 100644 (file)
@@ -1122,7 +1122,7 @@ of clones and fetches.
            connection (or proxy, if configured)
 
          - `ssh`: git over ssh (including `host:path` syntax,
-           `git+ssh://`, etc).
+           `ssh://`, etc).
 
          - `rsync`: git over rsync
 
index fd7ffe1840e64417cf94d208840cf97c91e962b7..3babb81d2e68e163bbe6842828f51202a8e58199 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -267,9 +267,9 @@ static enum protocol get_protocol(const char *name)
                return PROTO_SSH;
        if (!strcmp(name, "git"))
                return PROTO_GIT;
-       if (!strcmp(name, "git+ssh"))
+       if (!strcmp(name, "git+ssh")) /* deprecated - do not use */
                return PROTO_SSH;
-       if (!strcmp(name, "ssh+git"))
+       if (!strcmp(name, "ssh+git")) /* deprecated - do not use */
                return PROTO_SSH;
        if (!strcmp(name, "file"))
                return PROTO_FILE;
index 67f366687c7abf2f6bd9cf31faa6f4ed9e6dc69e..908e08b9aec5728575e7bb2c6344c28e2fb64a25 100644 (file)
@@ -1001,8 +1001,9 @@ struct transport *transport_get(struct remote *remote, const char *url)
                || starts_with(url, "file://")
                || starts_with(url, "git://")
                || starts_with(url, "ssh://")
-               || starts_with(url, "git+ssh://")
-               || starts_with(url, "ssh+git://")) {
+               || starts_with(url, "git+ssh://") /* deprecated - do not use */
+               || starts_with(url, "ssh+git://") /* deprecated - do not use */
+               ) {
                /*
                 * These are builtin smart transports; "allowed" transports
                 * will be checked individually in git_connect.