From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Is git-checkout's restoring d/f conflict really sane?
Date: Wed, 15 May 2019 10:56:46 +0900 [thread overview]
Message-ID: <xmqq1s108opt.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CACsJy8DoxHoi0H3R91ovqDPjk0tN3Rr8fQOjaLt_2P9O3n9b_g@mail.gmail.com> (Duy Nguyen's message of "Tue, 14 May 2019 17:49:03 +0700")
Duy Nguyen <pclouds@gmail.com> writes:
> Technically 'one' is still tracked (even if it's a directory) so what
> we're doing is right. I'm just not sure if there's some big surprise
> factor here. And whether it's better to pause and double check with
> the user before deleting everything.
I agree to all of the above, including the part "technically it is
correct", but more importantly "stop and double check".
As changing between a directory and a non-directory is a rare event
anyway, I do not mind making it a bit more cumbersome and say "you
asked me to check out a regular file 'one', but you have a directory
'one', that has an unignored untracked file in it, so I'd refuse to
do so. Come back after you removed them manually, or use the '--force'
option".
We should not refuse if 'one' is an empty directory or all files in
it are ignored, though.
Thanks.
prev parent reply other threads:[~2019-05-15 1:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 9:41 Is git-checkout's restoring d/f conflict really sane? Duy Nguyen
2019-05-14 10:37 ` Junio C Hamano
2019-05-14 10:49 ` Duy Nguyen
2019-05-15 1:56 ` Junio C Hamano [this message]
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=xmqq1s108opt.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.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).