threads / discuss / 22453

FEATURE REQUEST: Allow SSH style URLS (with extra colon)

Subject: FEATURE REQUEST: Allow SSH style URLS (with extra colon)

## tl;dr

4 messages between Jan 30, 2010 and Jan 30, 2010.

replies: 3people: 4as markdown or json

Jari Aalto· Jan 30, 2010, 16:57 UTC · lore
According to git-clone[1] the SSH protocol is specied as:
    ssh://[user@]host.xz[:port]/path

It woudl be nice if the ":" were allowed, so that the familiar SSH style patch notation could be used, making the spec:

    ssh://[user@]host.xz[:[port]]/path
An example:
    ssh://foo@examplecom:/path
                        |
                        Allowed
Jari
[1] http://www.kernel.org/pub/software/scm/git/docs/git-clone.html
Ilari Liusvaara· Jan 30, 2010, 17:27 UTC · re: Jari Aalto · lore

Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)

On Sat, Jan 30, 2010 at 06:57:56PM +0200, Jari Aalto wrote:
Show 16 quoted lines
> 
> According to git-clone[1] the SSH protocol is specied as:
> 
>     ssh://[user@]host.xz[:port]/path
> 
> It woudl be nice if the ":" were allowed, so that the familiar SSH style
> patch notation could be used, making the spec:
> 
>     ssh://[user@]host.xz[:[port]]/path
> 
> An example:
> 
>     ssh://foo@examplecom:/path
>                         |
>                         Allowed
> 
I would use:
ssh://[user@]host.xz[:port][:]/path

Since empty port isn't allowed, this grammar is uniquely parseable, and would allow specifying port too (if you don't need to specify it, you could just use the scp syntax)[1].

[1] Of course 'ssh://[user@]host.xz[:port]/~/path' works too..
-Ilari
Petr Baudis· Jan 30, 2010, 22:21 UTC · re: Jari Aalto · lore

Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)

On Sat, Jan 30, 2010 at 06:57:56PM +0200, Jari Aalto wrote:
Show 15 quoted lines
> 
> According to git-clone[1] the SSH protocol is specied as:
> 
>     ssh://[user@]host.xz[:port]/path
> 
> It woudl be nice if the ":" were allowed, so that the familiar SSH style
> patch notation could be used, making the spec:
> 
>     ssh://[user@]host.xz[:[port]]/path
> 
> An example:
> 
>     ssh://foo@examplecom:/path
>                         |
>                         Allowed

But that's not an URL anymore. If you want to use ssh pathspec, write it as a pathspec, not an URL. Just foo@example.com:/path works fine. ;-)

				Petr "Pasky" Baudis
Junio C Hamano· Jan 30, 2010, 22:30 UTC · re: Petr Baudis · lore

Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)

Petr Baudis <pasky@suse.cz> writes:
Show 10 quoted lines
> On Sat, Jan 30, 2010 at 06:57:56PM +0200, Jari Aalto wrote:
>> 
>> An example:
>> 
>>     ssh://foo@examplecom:/path
>>                         |
>>                         Allowed
>
> But that's not an URL anymore. If you want to use ssh pathspec, write it
> as a pathspec, not an URL. Just foo@example.com:/path works fine. ;-)
The way URLs are defined is:
	<scheme>:<scheme-specific-part>

so if somebody defines his "ssh" scheme to allow any random garbage, its their URL and you cannot say "that is not an URL", unless you qualify your statement with "I want to keep ssh scheme consistent with the common internet scheme syntax".

As I think "ssh://..." is simply moronic, I don't even care to "keep" the scheme specific part consistent with the common internet scheme syntax to begin with. I agree with your conclusion, though ;-)

scp syntax works just fine.

← back to recent threads