git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FEATURE REQUEST: Allow SSH style URLS (with extra colon)
@ 2010-01-30 16:57 Jari Aalto
  2010-01-30 17:27 ` Ilari Liusvaara
  2010-01-30 22:21 ` Petr Baudis
  0 siblings, 2 replies; 4+ messages in thread
From: Jari Aalto @ 2010-01-30 16:57 UTC (permalink / raw)
  To: git


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)
  2010-01-30 16:57 FEATURE REQUEST: Allow SSH style URLS (with extra colon) Jari Aalto
@ 2010-01-30 17:27 ` Ilari Liusvaara
  2010-01-30 22:21 ` Petr Baudis
  1 sibling, 0 replies; 4+ messages in thread
From: Ilari Liusvaara @ 2010-01-30 17:27 UTC (permalink / raw)
  To: Jari Aalto; +Cc: git

On Sat, Jan 30, 2010 at 06:57:56PM +0200, Jari Aalto wrote:
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)
  2010-01-30 16:57 FEATURE REQUEST: Allow SSH style URLS (with extra colon) Jari Aalto
  2010-01-30 17:27 ` Ilari Liusvaara
@ 2010-01-30 22:21 ` Petr Baudis
  2010-01-30 22:30   ` Junio C Hamano
  1 sibling, 1 reply; 4+ messages in thread
From: Petr Baudis @ 2010-01-30 22:21 UTC (permalink / raw)
  To: Jari Aalto; +Cc: git

On Sat, Jan 30, 2010 at 06:57:56PM +0200, Jari Aalto wrote:
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)
  2010-01-30 22:21 ` Petr Baudis
@ 2010-01-30 22:30   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2010-01-30 22:30 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Jari Aalto, git

Petr Baudis <pasky@suse.cz> writes:

> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-30 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-30 16:57 FEATURE REQUEST: Allow SSH style URLS (with extra colon) Jari Aalto
2010-01-30 17:27 ` Ilari Liusvaara
2010-01-30 22:21 ` Petr Baudis
2010-01-30 22:30   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).