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

Re: [PATCH] clone: tighten "local paths with colons" check a bit

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Sep 27, 2013, 21:56 UTC
Message-ID
<20130927215631.GN9464@google.com>
In-Reply-To
<1380289693-593-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
> commit 6000334 (clone: allow cloning local paths with colons in them -
> 2013-05-04) is added to make it possible to specify a path that has
> colons in it without file://, e.g. ../foo:bar/somewhere. But the check
> is a bit loose.
[...]
> Make sure we only check so when no protocol is specified and the url
> is not started with '['.

More precisely, this disables the "'/' before ':'" check when the url has been mangled by '[]' unwrapping (which only happens if the URL starts with '[' and contains an ']' at some point later).

If I try to clone "[foo]bar/baz:qux", after this change it will act as though I specified the remote repository "foo:qux" instead of the local repository "./foo:qux" as before this change. Both are wrong --- that's a bug for another day.

Thanks, both.
Previous: Jeff KingNext: Torsten Bögershausen
Message 3 of 4 in “clone: tighten "local paths with colons" check a bit”
  1. clone: tighten "local paths with colons" check a bitNguyễn Thái Ngọc Duy, Sep 27, 2013
  2. Jeff KingSep 27, 2013
  3. Jonathan NiederSep 27, 2013
  4. Torsten BögershausenSep 28, 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.