Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Leslie Wang <qiwa@pensando.io>
Cc: git@vger.kernel.org
Subject: Re: regarding fix on "git clone $there $here"
Date: Wed, 9 May 2018 02:41:32 -0400	[thread overview]
Message-ID: <20180509064131.GA26636@sigill.intra.peff.net> (raw)
In-Reply-To: <2F384E33-2101-4D90-986B-FAE2FC2AD7C5@pensando.io>

On Tue, May 08, 2018 at 10:25:58PM -0700, Leslie Wang wrote:

> Recently we try to upgrade ubuntu from 17.10 to 18.04, then we found
> one inconsistent behavior on git clone.
> 
> 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.
> 
> However, at latest 2.17.0 which is part of ubuntu 18.04, seems like
> git clone failure will not auto remove this folder. I notice 2.16.2
> and 2.17.0 release note includes this fix. So just wonder to know if
> prior behavior was think of bug, and this fix has change the behavior. 
> 
>  * "git clone $there $here" is allowed even when here directory exists
>    as long as it is an empty directory, but the command incorrectly
>    removed it upon a failure of the operation.

Right, the old behavior was considered a bug. Git didn't create the
directory, so when rolling back its changes on failure, it shouldn't
delete it either.

-Peff

  reply	other threads:[~2018-05-09  6:41 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 [this message]
2018-05-09  6:44 ` Junio C Hamano
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=20180509064131.GA26636@sigill.intra.peff.net \
    --to=peff@peff.net \
    --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