Skip to content

Commit 07c7782

Browse files
carlosmngitster
authored andcommitted
Disown ssh+git and git+ssh
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a08595f commit 07c7782

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Documentation/git.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ of clones and fetches.
11221122
connection (or proxy, if configured)
11231123

11241124
- `ssh`: git over ssh (including `host:path` syntax,
1125-
`git+ssh://`, etc).
1125+
`ssh://`, etc).
11261126

11271127
- `rsync`: git over rsync
11281128

connect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ static enum protocol get_protocol(const char *name)
267267
return PROTO_SSH;
268268
if (!strcmp(name, "git"))
269269
return PROTO_GIT;
270-
if (!strcmp(name, "git+ssh"))
270+
if (!strcmp(name, "git+ssh")) /* deprecated - do not use */
271271
return PROTO_SSH;
272-
if (!strcmp(name, "ssh+git"))
272+
if (!strcmp(name, "ssh+git")) /* deprecated - do not use */
273273
return PROTO_SSH;
274274
if (!strcmp(name, "file"))
275275
return PROTO_FILE;

transport.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,8 +1001,9 @@ struct transport *transport_get(struct remote *remote, const char *url)
10011001
|| starts_with(url, "file://")
10021002
|| starts_with(url, "git://")
10031003
|| starts_with(url, "ssh://")
1004-
|| starts_with(url, "git+ssh://")
1005-
|| starts_with(url, "ssh+git://")) {
1004+
|| starts_with(url, "git+ssh://") /* deprecated - do not use */
1005+
|| starts_with(url, "ssh+git://") /* deprecated - do not use */
1006+
) {
10061007
/*
10071008
* These are builtin smart transports; "allowed" transports
10081009
* will be checked individually in git_connect.

0 commit comments

Comments
 (0)