Subject: Re: git-switch history and checkout compatibility

From: Junio C Hamano <[email-masked]>
Date: Tue, 01 Aug 2023 11:28:47 -0700

Namikaze Minato <[email-masked]> writes:

> Isn't checkout supposed to become deprecated at some point?

Deprecating "checkout" hurts those who are confused by what the
split "switch/restore" pair of commands do (cf. this very discussion
we are having), and folks who are happily using "checkout".  On the
other hand, those who are happy with "switch/restore" would not be
affected by the existence of "checkout".  So, no, I do not think it
is part of the map to deprecate the command.  At least not until the
split "switch/restore" pair of commands become less confusing and
lose their "experimental" state, that is.

> ... And as you said you were
> not among the primary advocates to add it, I guess we should wait for
> someone else to reply about this?

There are things "switch/restore" pair do differently relative to
"checkout".  Some of them (like "restore" allowing checking out
paths from tree only to the working tree files while not touching
the index, which is not possible with "checkout") are very much
welcome improvement, but some others (cf. this very discussion we
are having on "switch") may simply not make any sense.  Those who
advocated and pushed the split "switch/restore" pair should be able
to explain why they chose to do things differently much better than
I would be (some differences may simply be bugs waiting to be fixed
by them).