From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Stephan Janssen <sjanssen@you-get.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git removes existing folder when cancelling clone
Date: Tue, 2 Jan 2018 06:12:35 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.21.1801020610400.14363@localhost.localdomain> (raw)
In-Reply-To: <FE0E0877-B77D-4BD6-A513-435C251D920A@you-get.com>
[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]
On Tue, 2 Jan 2018, Stephan Janssen wrote:
> Hi,
>
> I hope this mailing list is the right way to communicate this.
>
> I just noticed the following behaviour on macOS 10.13.2 running Git v2.15.0:
>
> 1. `mkdir new-folder`
> 2. `ls` - shows new-folder
> 3. `git clone [repo] new-folder`
> 4. Git asks for password
> 5. I cancel by pressing ctrl+c
>
> Result:
> `ls` no longer shows new-folder.
>
> Expected result:
> `ls` shows new-folder
>
> I’m not sure whether this might be a case of ‘works as intended’,
> but it’s not what I’d expect.
i'm *pretty* sure that the optional directory name you supply is
meant to represent a directory you want git to *create* for you, not
one that already exists. that means the behaviour you see makes sense
-- if git assumes it was supposed to create the directory, and you
cancel the clone, it reasonably assumes it should get rid of it.
i am willing to be corrected.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
next prev parent reply other threads:[~2018-01-02 11:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 11:10 Git removes existing folder when cancelling clone Stephan Janssen
2018-01-02 11:12 ` Robert P. J. Day [this message]
2018-01-02 20:04 ` Jeff King
2018-01-02 21:07 ` [PATCH 0/4] " Jeff King
2018-01-02 21:08 ` [PATCH 1/4] t5600: fix outdated comment about unborn HEAD Jeff King
2018-01-02 21:09 ` [PATCH 2/4] t5600: modernize style Jeff King
2018-01-02 21:10 ` [PATCH 3/4] clone: factor out dir_exists() helper Jeff King
2018-01-04 23:47 ` Junio C Hamano
2018-01-04 23:54 ` Jeff King
2018-01-05 0:22 ` Jeff King
2018-01-05 19:19 ` Junio C Hamano
2018-01-02 21:11 ` [PATCH 4/4] clone: do not clean up directories we didn't create Jeff King
2018-01-02 22:49 ` Eric Sunshine
2018-01-02 23:39 ` Jeff King
2018-01-05 18:50 ` Junio C Hamano
2018-01-04 23:48 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.21.1801020610400.14363@localhost.localdomain \
--to=rpjday@crashcourse.ca \
--cc=git@vger.kernel.org \
--cc=sjanssen@you-get.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).