From: Eric Sunshine <sunshine@sunshineco.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Git List <git@vger.kernel.org>, reidw@rawsound.com
Subject: Re: [PATCH/RFC] connect.c: Ignore extra colon after hostname
Date: Tue, 7 Apr 2015 13:57:50 -0400 [thread overview]
Message-ID: <CAPig+cQZDPRa=2Oaur71OufeP2ECjOFK3JEwdRQNUYs49SySNg@mail.gmail.com> (raw)
In-Reply-To: <55238C42.7020402@web.de>
On Tue, Apr 7, 2015 at 3:50 AM, Torsten Bögershausen <tboegi@web.de> wrote:
> Ignore an extra ':' at the end of the hostname in URL's like
> "ssh://example.com:/path/to/repo"
>
> The colon is ment to separate a port number from the hostname.
s/ment/meant/
More below.
> If the port is empty, the colon should be ignored, see RFC 3986.
>
> It had been working for URLs with ssh:// scheme, but was unintentionally
> broken in 86ceb3, "allow ssh://user@[2001:db8::1]/repo.git"
>
> Reported-by: Reid Woodbury Jr. <reidw@rawsound.com>
> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
> ---
> diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
> index 02b40b1..1f67bdd 100755
> --- a/t/t5601-clone.sh
> +++ b/t/t5601-clone.sh
> @@ -387,14 +387,18 @@ do
> done
>
> #with ssh:// scheme
> -test_expect_success 'clone ssh://host.xz/home/user/repo' '
> - test_clone_url "ssh://host.xz/home/user/repo" host.xz "/home/user/repo"
> -'
> -
> -# from home directory
> -test_expect_success 'clone ssh://host.xz/~repo' '
> - test_clone_url "ssh://host.xz/~repo" host.xz "~repo"
> +#ignore trailing colon
> +for tcol in "" :
> +do
> + test_expect_success "clone ssh://host.xz$tcol/home/user/repo" '
> + test_clone_url "ssh://host.xz$tcol/home/user/repo" host.xz /home/user/repo
> + '
> + # from home directory
> + test_expect_success "clone ssh://host.xz$tcol/~repo" '
> + test_clone_url "ssh://host.xz$tcol/~repo" host.xz "~repo"
> '
> +done
> +test_done
Unwanted test_done crept in?
> # with port number
> test_expect_success 'clone ssh://host.xz:22/home/user/repo' '
prev parent reply other threads:[~2015-04-07 17:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 7:50 [PATCH/RFC] connect.c: Ignore extra colon after hostname Torsten Bögershausen
2015-04-07 17:57 ` Eric Sunshine [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPig+cQZDPRa=2Oaur71OufeP2ECjOFK3JEwdRQNUYs49SySNg@mail.gmail.com' \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=reidw@rawsound.com \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).