Re: [PATCH] clone: allow cloning local paths with colons in them

2013-04-27 Thread William Giokas
On Sat, Apr 27, 2013 at 10:36:18AM +0700, Nguyễn Thái Ngọc Duy wrote: Usually foo:bar is interpreted as an ssh url. This patch allows to clone from such paths by putting at least one slash before the colon (i.e. /path/to/foo:bar or just ./foo:bar). file://foo:bar should also work, but local

Re: [PATCH] clone: allow cloning local paths with colons in them

2013-04-27 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: diff --git a/connect.c b/connect.c index f57efd0..b568f10 100644 --- a/connect.c +++ b/connect.c @@ -551,8 +551,11 @@ struct child_process *git_connect(int fd[2], const char *url_orig, path = strchr(end, c); if (path

Re: [PATCH] clone: allow cloning local paths with colons in them

2013-04-27 Thread Duy Nguyen
On Sun, Apr 28, 2013 at 4:16 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: diff --git a/connect.c b/connect.c index f57efd0..b568f10 100644 --- a/connect.c +++ b/connect.c @@ -551,8 +551,11 @@ struct child_process *git_connect(int fd[2], const

Re: [PATCH] clone: allow cloning local paths with colons in them

2013-04-27 Thread Eric Sunshine
On Sat, Apr 27, 2013 at 8:19 PM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Apr 28, 2013 at 4:16 AM, Junio C Hamano gits...@pobox.com wrote: That was fairly hard to grok. Is that equivalent to this? if (c == ':' path strchrnul(host, '/')) { /* is the

Re: [PATCH] clone: allow cloning local paths with colons in them

2013-04-27 Thread Duy Nguyen
On Sun, Apr 28, 2013 at 8:48 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Apr 27, 2013 at 8:19 PM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Apr 28, 2013 at 4:16 AM, Junio C Hamano gits...@pobox.com wrote: That was fairly hard to grok. Is that equivalent to this?

[PATCH] clone: allow cloning local paths with colons in them

2013-04-26 Thread Nguyễn Thái Ngọc Duy
Usually foo:bar is interpreted as an ssh url. This patch allows to clone from such paths by putting at least one slash before the colon (i.e. /path/to/foo:bar or just ./foo:bar). file://foo:bar should also work, but local optimizations are off in that case, which may be unwanted. While at there,