# [PATCH] urls.txt: document optional port specification in git URLS

9 messages from 2009-02-04 to 2009-02-05. Participants: Stefan Naewe, Junio C Hamano, Stefan Näwe, Nicolas Sebrecht, Marius Storm-Olsen.
Thread: https://gitlist.dev/t/17552

## Stefan Naewe, 2009-02-04 11:51

Subject: [PATCH] urls.txt: document optional port specification in git URLS
Message-ID: <1233748295-4554-1-git-send-email-stefan.naewe@atlas-elektronik.com>
URL: https://gitlist.dev/e/1233748295-4554-1-git-send-email-stefan.naewe%40atlas-elektronik.com

```
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
---
 Documentation/urls.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index fa34c67..c74f00b 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -8,8 +8,8 @@ to name the remote repository:
 - rsync://host.xz/path/to/repo.git/
 - http://host.xz/path/to/repo.git/
 - https://host.xz/path/to/repo.git/
-- git://host.xz/path/to/repo.git/
-- git://host.xz/~user/path/to/repo.git/
+- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
+- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
 - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
 - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
 - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
-- 
1.6.1.2

```

## Junio C Hamano, 2009-02-04 18:09

Subject: Re: [PATCH] urls.txt: document optional port specification in git URLS
Message-ID: <7vr62et6p4.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vr62et6p4.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1233748295-4554-1-git-send-email-stefan.naewe@atlas-elektronik.com>

```
Stefan Naewe <stefan.naewe@atlas-elektronik.com> writes:

> Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
> ---
>  Documentation/urls.txt |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/urls.txt b/Documentation/urls.txt
> index fa34c67..c74f00b 100644
> --- a/Documentation/urls.txt
> +++ b/Documentation/urls.txt
> @@ -8,8 +8,8 @@ to name the remote repository:
>  - rsync://host.xz/path/to/repo.git/
>  - http://host.xz/path/to/repo.git/
>  - https://host.xz/path/to/repo.git/
> -- git://host.xz/path/to/repo.git/
> -- git://host.xz/~user/path/to/repo.git/
> +- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
> +- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/

Hmph, I wonder if we want that for http:// and https://, too.

```

## Stefan Naewe, 2009-02-04 20:49

Subject: [PATCH v2] urls.txt: document optional port specification in git URLS
Message-ID: <1233780575-20125-1-git-send-email-stefan.naewe+git@gmail.com>
URL: https://gitlist.dev/e/1233780575-20125-1-git-send-email-stefan.naewe%2Bgit%40gmail.com
In-Reply-To: <7vr62et6p4.fsf@gitster.siamese.dyndns.org>

```
Signed-off-by: Stefan Naewe <stefan.naewe+git@gmail.com>
---
 Documentation/urls.txt |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index fa34c67..5355ebc 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -6,10 +6,10 @@ to name the remote repository:
 
 ===============================================================
 - rsync://host.xz/path/to/repo.git/
-- http://host.xz/path/to/repo.git/
-- https://host.xz/path/to/repo.git/
-- git://host.xz/path/to/repo.git/
-- git://host.xz/~user/path/to/repo.git/
+- http://host.xz{startsb}:port{endsb}/path/to/repo.git/
+- https://host.xz{startsb}:port{endsb}/path/to/repo.git/
+- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
+- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
 - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
 - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
 - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
-- 
1.6.1.2

```

## Junio C Hamano, 2009-02-04 20:53

Subject: Re: [PATCH v2] urls.txt: document optional port specification in git URLS
Message-ID: <7vvdrpore9.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vvdrpore9.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1233780575-20125-1-git-send-email-stefan.naewe+git@gmail.com>

```
Stefan Naewe <stefan.naewe@googlemail.com> writes:

> Signed-off-by: Stefan Naewe <stefan.naewe+git@gmail.com>
> ---
>  Documentation/urls.txt |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/urls.txt b/Documentation/urls.txt
> index fa34c67..5355ebc 100644
> --- a/Documentation/urls.txt
> +++ b/Documentation/urls.txt
> @@ -6,10 +6,10 @@ to name the remote repository:
>  
>  ===============================================================
>  - rsync://host.xz/path/to/repo.git/
> -- http://host.xz/path/to/repo.git/
> -- https://host.xz/path/to/repo.git/
> -- git://host.xz/path/to/repo.git/
> -- git://host.xz/~user/path/to/repo.git/
> +- http://host.xz{startsb}:port{endsb}/path/to/repo.git/
> +- https://host.xz{startsb}:port{endsb}/path/to/repo.git/
> +- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
> +- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/

Do you know if these port specifications do actually work?  Just double
checking.

```

## Stefan Näwe, 2009-02-04 21:02

Subject: Re: [PATCH v2] urls.txt: document optional port specification in git URLS
Message-ID: <loom.20090204T205910-325@post.gmane.org>
URL: https://gitlist.dev/e/loom.20090204T205910-325%40post.gmane.org
In-Reply-To: <7vvdrpore9.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano <gitster <at> pobox.com> writes:

> 
> Stefan Naewe <stefan.naewe <at> googlemail.com> writes:
> 
> >  ===============================================================
> >  - rsync://host.xz/path/to/repo.git/
> > -- http://host.xz/path/to/repo.git/
> > -- https://host.xz/path/to/repo.git/
> > -- git://host.xz/path/to/repo.git/
> > -- git://host.xz/~user/path/to/repo.git/
> > +- http://host.xz{startsb}:port{endsb}/path/to/repo.git/
> > +- https://host.xz{startsb}:port{endsb}/path/to/repo.git/
> > +- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
> > +- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
> >  - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
> >  - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
> >  - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
> 
> Do you know if these port specifications do actually work?  Just double
> checking.
> 

A quick test with 'netcat':

In xterm 1:

$ nc -l -p 8080


In xterm 2:

$ git clone http://localhost:8080/foo/bar/baz.git

Back in xterm 1 I get:

GET /foo/bar/baz.git/info/refs HTTP/1.1
User-Agent: git/1.6.1.2
Host: localhost:8080
Accept: */*


More testing needed ?

Regards,
Stefan

```

## Junio C Hamano, 2009-02-04 21:05

Subject: Re: [PATCH v2] urls.txt: document optional port specification in git URLS
Message-ID: <7vvdrpnc9u.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vvdrpnc9u.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <loom.20090204T205910-325@post.gmane.org>

```
Stefan Näwe <stefan.naewe+git@gmail.com> writes:

> More testing needed ?

No, I just was curious.  Thanks for being thorough.

```

## Nicolas Sebrecht, 2009-02-05 08:36

Subject: Re: [PATCH] urls.txt: document optional port specification in git URLS
Message-ID: <20090205083604.GC27983@ultras>
URL: https://gitlist.dev/e/20090205083604.GC27983%40ultras
In-Reply-To: <1233748295-4554-1-git-send-email-stefan.naewe@atlas-elektronik.com>

```

On Wed, Feb 04, 2009 at 12:51:35PM +0100, Stefan Naewe wrote:

>  Documentation/urls.txt |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

[...]

> +- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
> +- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
>  - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/

I did not understood. To what does '{startsb}' and '{endsb}' refer ?

-- 
Nicolas Sebrecht

```

## Stefan Naewe, 2009-02-05 08:41

Subject: Re: [PATCH] urls.txt: document optional port specification in git URLS
Message-ID: <498AA646.4040009@atlas-elektronik.com>
URL: https://gitlist.dev/e/498AA646.4040009%40atlas-elektronik.com
In-Reply-To: <20090205080913.GB27983@ultras>

```
(Please don't reply to me only, CC the mailing list)

On 2/5/2009 9:09 AM, Nicolas Sebrecht wrote:
> On Wed, Feb 04, 2009 at 12:51:35PM +0100, Stefan Naewe wrote:
> 
>>  Documentation/urls.txt |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> [...]
> 
>> +- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
>> +- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
>>  - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
>>  - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
>>  - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
> 
> I did not understood. To what does '{startsb}' and '{endsb}' refer ?

Look at the generated documentation.

Regards,
Stefan
-- 
----------------------------------------------------------------
/dev/random says: Useless Invention: Fireproof kindling.

```

## Marius Storm-Olsen, 2009-02-05 09:12

Subject: Re: [PATCH] urls.txt: document optional port specification in git URLS
Message-ID: <498AAD83.9000200@trolltech.com>
URL: https://gitlist.dev/e/498AAD83.9000200%40trolltech.com
In-Reply-To: <20090205083604.GC27983@ultras>

```
Nicolas Sebrecht said the following on 05.02.2009 09:36:
> On Wed, Feb 04, 2009 at 12:51:35PM +0100, Stefan Naewe wrote:
>> +- git://host.xz{startsb}:port{endsb}/path/to/repo.git/
>> +- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/
>>  - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
>>  - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
>>  - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
> 
> I did not understood. To what does '{startsb}' and '{endsb}' refer ?

Commands for the documentation tool
     {startsb} = Start/Left Square Bracket
     {endsb} = End/Right Square Bracket

so, you'll end up seeing
     - git://host.xz[:port]/path/to/repo.git/
     - git://host.xz[:port]/~user/path/to/repo.git/

-- 
.marius [@trolltech.com]
'if you know what you're doing, it's not research'


```
