Re: [PATCH v2] checkout: teach --worktree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux