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

Re: regarding fix on "git clone $there $here"

From
Junio C Hamano <gitster@pobox.com>
Date
May 9, 2018, 06:44 UTC
Message-ID
<xmqqin7xl446.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<2F384E33-2101-4D90-986B-FAE2FC2AD7C5@pensando.io>
Leslie Wang <qiwa@pensando.io> writes:
Show 5 quoted lines
> At 2.14.1 or 2.15.1, if I run command like 
>  - mkdir /tmp/111
>  - git clone git@github.com:111/111 /tmp/111
>
> because it will failure, then /tmp/111 will be removed automatically.

Yes, this was a (longstanding) bug that nobody bothered to fix for a long time. As "git clone" did not create /tmp/111 but it was given to it by the external world, it shouldn't remove it upon failure. Of course, if you omit the "mkdir" in the above sequence and let "git clone" create /tmp/111, tne Git will remove it upon failure as part of the clean-up.

Previous: Jeff KingNext: Leslie Wang
Message 3 of 4 in “regarding fix on "git clone $there $here"”
  1. Leslie WangMay 9, 2018
  2. Jeff KingMay 9, 2018
  3. Junio C HamanoMay 9, 2018
  4. Leslie WangMay 9, 2018

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.