git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 28, 2013, 01:48 UTC
Message-ID
<CAPig+cQ+XQYyg2ihvfbZeSApBfWqpLYtq58Jv3iagS5w_iHXbQ@mail.gmail.com>
In-Reply-To
<CACsJy8DEMrv08D3wGvebV+W73TA8eTH58KHybXpQQbsSJ5NKZA@mail.gmail.com>
On Sat, Apr 27, 2013 at 8:19 PM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 17 quoted lines
> On Sun, Apr 28, 2013 at 4:16 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> That was fairly hard to grok. Is that equivalent to this?
>>
>>                 if (c == ':' && path < strchrnul(host, '/')) {
>>                         /* is the first slash past the colon? */
>>                         protocol = PROTO_SSH;
>>                         *path++ = '\0';
>>                 } else {
>>                         path = end;
>>                 }
>>
>
> The original code is already hard to grok so I may be mistaken here.
> But I think it's not the same. For the case when c == '/', it will do
> "path = end;", which is unintended. It should keep the current "path"
> value (i.e. == strchr(end, '/')). The use of "strchrnul(host, '/')" is
> good though.
Do you want to take Windows '\' into account also?
Previous: Duy NguyenNext: Duy Nguyen
Message 12 of 16 in “[BUG] Filenames with single colon being treated as remote repository”
  1. William GiokasApr 21, 2013
  2. Jonathan NiederApr 21, 2013
  3. Jeff KingApr 21, 2013
  4. Jonathan NiederApr 21, 2013
  5. Junio C HamanoApr 21, 2013
  6. Jeff KingApr 22, 2013
  7. Junio C HamanoApr 22, 2013
  8. clone: allow cloning local paths with colons in themNguyễn Thái Ngọc Duy, Apr 27, 2013
  9. William GiokasApr 27, 2013
  10. Junio C HamanoApr 27, 2013
  11. Duy NguyenApr 28, 2013
  12. Eric SunshineApr 28, 2013
  13. Duy NguyenApr 28, 2013
  14. clone: allow cloning local paths with colons in themNguyễn Thái Ngọc Duy, May 4, 2013
  15. Junio C HamanoMay 7, 2013
  16. Jeff KingMay 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.