git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denton Liu <liu.denton@gmail.com>
To: phillip.wood@dunelm.org.uk
Cc: Git Mailing List <git@vger.kernel.org>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2] checkout: teach --worktree
Date: Tue, 23 Jun 2020 11:55:38 -0400	[thread overview]
Message-ID: <20200623155538.GA2014954@generichostname> (raw)
In-Reply-To: <3c223d33-7f3f-7f4c-df91-3b72271308cd@gmail.com>

Hi Phillip,

Sorry for the late reply.

On Tue, Jun 16, 2020 at 05:01:53PM +0100, Phillip Wood wrote:
> I'm afraid I'm not sure that adding another option to `git checkout` is a
> good idea. The behavior of `git checkout` is already complicated enough
> which is why we ended up with switch and restore separating out branch
> switching from file updating.

I think that since this option clearly applies only for a
restore-type action and there are checks in place to ensure that
the user is not attempting to use it for a switch-type action, it
doesn't introduce much more complexity than the `git restore --worktree`
option does.

> Given `git restore` provides a way to update the worktree without touching
> the index I'm not convinced we should be further complicating `git checkout`
> especially as it defaults to --overlay unless -p is given which is confusing
> in itself.

I don't think it'll hurt to provide more than one way of doing it. As a
pretty long-time user of git, I've been having trouble picking up the
switch/restore commands in favour of good ol' checkout due to muscle
memory. I agree that I should try and switch over to these new commands
but old habits die hard and I think it would be much easier to just
provide this option to checkout.

Thanks,

Denton

  reply	other threads:[~2020-06-23 15:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13 14:25 [PATCH] checkout: teach --worktree Denton Liu
2020-06-14  2:51 ` Eric Sunshine
2020-06-14  7:44   ` Denton Liu
2020-06-14  8:02     ` Denton Liu
2020-06-14 21:37   ` Junio C Hamano
2020-06-14  8:49 ` [PATCH v2] " Denton Liu
2020-06-16 16:01   ` Phillip Wood
2020-06-23 15:55     ` Denton Liu [this message]
2020-06-24 10:20       ` Phillip Wood

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=20200623155538.GA2014954@generichostname \
    --to=liu.denton@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sunshine@sunshineco.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.
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 NNTP newsgroup(s).