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

Re: git clone NonExistentLocation

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 17, 2011, 16:53 UTC
Message-ID
<4D5D5275.5070501@drmicha.warpmail.net>
In-Reply-To
<AANLkTin3Pf4XD_gbwxPzW4uff9SbDWJdGug6jM_SHDo+@mail.gmail.com>
Sverre Rabbelier venit, vidit, dixit 17.02.2011 15:03:
Show 17 quoted lines
> Heya,
> 
> [Thanks for summarizing.]
> 
> On Thu, Feb 17, 2011 at 12:59, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> Sverre, with your 86ac751, the following two are equivalent (modulo a
>> warning) on a nonexisting dir:
>>
>> git clone dir
>> git init dir
>>
>> Is that intentional?
> 
> No, that was not intentional. The former should still be an error if
> 'dir' is an empy directory.
> 

Digging a little further: since a nonexisting directory is neither a dir nor a file, clone thinks it is not local (is_local=is_bundle=0). None of the transport_* commands error out since the relevant one is guarded by 86ac751...

Reverting that or forcing is_local=1 both help, but how to detect "local nonexisting" reliably?

In fact, I don't have a problem with the current state if we document it :)
Michael
Previous: Sverre RabbelierNext: Jeff King
Message 6 of 10 in “git clone NonExistentLocation”
  1. Stefan NaeweFeb 17, 2011
  2. Michael J GruberFeb 17, 2011
  3. Stefan NaeweFeb 17, 2011
  4. Michael J GruberFeb 17, 2011
  5. Sverre RabbelierFeb 17, 2011
  6. Michael J GruberFeb 17, 2011
  7. Jeff KingFeb 18, 2011
  8. Junio C HamanoFeb 18, 2011
  9. Jeff KingFeb 18, 2011
  10. Sverre RabbelierFeb 18, 2011

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.