From: Thomas Rast <trast@student.ethz.ch>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
Mark Levedahl <mlevedahl@gmail.com>,
Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com>
Subject: Re: [PATCH] submodule: fix relative url parsing for scp-style origin
Date: Mon, 10 Jan 2011 18:05:12 +0100 [thread overview]
Message-ID: <201101101805.13251.trast@student.ethz.ch> (raw)
In-Reply-To: <20110110164801.GA7714@burratino>
Jonathan Nieder wrote:
> Thomas Rast wrote:
> > + case "$remoteurl" in
> > + */*)
> > + remoteurl="${remoteurl%/*}"
> > + ;;
> > + *:*)
> > + remoteurl="${remoteurl%:*}"
> > + sep=:
> > + ;;
>
> What happens to
>
> url = ssh://example.com:1234
> url = ftp://ftp.example.com
Neither specifies a repo, unless you count "the default dir on the
remote side" (do we support that?). The existing code would have
snipped at the / and constructed something like ssh:/otherrepo.
> url = /local/path/with/a/colon:in:it
> url = git://example.com/path/with/a/colon:in:it
These work fine because the first case arm is "do we still have a
slash?", and thus takes precedence over the colon splitting.
> url = simple.subdir.of.cwd
That's caught by the outer 'case':
case "$url" in
../*)
url="${url#../}"
# ... what we're discussing here
;;
./*)
url="${url#./}"
;;
*)
break;;
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2011-01-10 17:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 10:37 [PATCH] submodule: fix relative url parsing for scp-style origin Thomas Rast
2011-01-10 16:48 ` Jonathan Nieder
2011-01-10 17:05 ` Thomas Rast [this message]
2011-01-10 17:22 ` Jonathan Nieder
2011-01-10 18:18 ` Thomas Rast
2011-01-10 17:01 ` Junio C Hamano
2011-01-11 2:59 ` Mark Levedahl
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=201101101805.13251.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffrey.freeman@syncleus.com \
--cc=jrnieder@gmail.com \
--cc=mlevedahl@gmail.com \
/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).