Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Leslie Wang <qiwa@pensando.io>
Cc: git@vger.kernel.org
Subject: Re: regarding fix on "git clone $there $here"
Date: Wed, 09 May 2018 15:44:57 +0900	[thread overview]
Message-ID: <xmqqin7xl446.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <2F384E33-2101-4D90-986B-FAE2FC2AD7C5@pensando.io> (Leslie Wang's message of "Tue, 8 May 2018 22:25:58 -0700")

Leslie Wang <qiwa@pensando.io> writes:

> 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.


  parent reply	other threads:[~2018-05-09  6:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  5:25 regarding fix on "git clone $there $here" Leslie Wang
2018-05-09  6:41 ` Jeff King
2018-05-09  6:44 ` Junio C Hamano [this message]
2018-05-09 16:47   ` Leslie Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqin7xl446.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=qiwa@pensando.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox