git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] builtin: unmark git-switch and git-restore as experimental
@ 2025-07-22 18:08 Justin Tobler
  2025-07-22 18:08 ` [PATCH 1/2] builtin: remove merge short flag for switch and restore Justin Tobler
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Justin Tobler @ 2025-07-22 18:08 UTC (permalink / raw)
  To: git; +Cc: ps, Justin Tobler

Greetings,

In 4e43b7ff (Declare both git-switch and git-restore experimental,
2019-04-25), the newly introduced git-switch(1) and git-restore(1)
commands were marked as experimental. This was done to provide time to
make breaking changes to the interface. It has now been over six years
since these commands were implemented and, over this time, there has not
been much change that would warrant these commands being labeled as
experimental.

There was a patch submitted[1] about a year ago also with the intent to
remove the experimental marker for these commands, but fizzled out
seemingly due to uncertainty around whether past discussions around
git-switch(1) had been resolved. Digging through some of these
conversations[2], a point of concern for git-switch(1) was around some of
the chosen short flags for git-switch(1), namely the `-c` flag for
creating a branch and the `-m` flag for merging local modifications into
the target branch via a three-way merge. The idea was that maybe these
short flags should instead be reserved for other not yet implemented
options in the future.

At this point, it seems rather difficult to justify changing
`-c/--create` to something different as it has been that way for a long
time and is used frequently. Also I'm not entirely convinced switching
to something like `-n/--new` is much better as it would run into a
similar issue of taking the short flag commonly used for the `--dry-run`
option. As for the `-m/--merge` flag, I don't think there is much harm
in dropping the short flag for what I presume to be a relatively
uncommon option. Outside of these explicitly brought up concerns though,
I have not found anything that would require a breaking change to
git-switch(1).

By removing the experimental marker, we help clarify the stability and
maturity of these commands. It will also make it easier for users to
adopt and recommend, as the experimental label has been a point of
hesitation for some. For new users, git-switch(1) and git-restore(1) do
help avoid some confusion that comes with the one-command-do-all
git-checkout(1) so helping to further promote their use should be
beneficial.

Thanks,
-Justin

[1]: <20240220092957.1296283-2-matttbe@kernel.org>
[2]: <877dkdwgfe.fsf@evledraar.gmail.com>

Justin Tobler (2):
  builtin: remove merge short flag for switch and restore
  builtin: unmark git-switch and git-restore as experimental

 Documentation/git-restore.adoc |  3 ---
 Documentation/git-switch.adoc  |  3 ---
 builtin/checkout.c             | 24 ++++++++++++++++--------
 3 files changed, 16 insertions(+), 14 deletions(-)


base-commit: 3f2a94875d2f41fe4758a439f68d8b73cfb19d0f
-- 
2.50.1.214.ga30f80fde9


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-07-28 20:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 18:08 [PATCH 0/2] builtin: unmark git-switch and git-restore as experimental Justin Tobler
2025-07-22 18:08 ` [PATCH 1/2] builtin: remove merge short flag for switch and restore Justin Tobler
2025-07-22 20:54   ` Junio C Hamano
2025-07-22 21:16     ` Justin Tobler
2025-07-22 18:08 ` [PATCH 2/2] builtin: unmark git-switch and git-restore as experimental Justin Tobler
2025-07-22 21:00   ` Junio C Hamano
2025-07-22 21:20     ` Justin Tobler
2025-07-22 20:22 ` [PATCH 0/2] " Junio C Hamano
2025-07-22 21:32   ` Justin Tobler
2025-07-28 19:42 ` [PATCH] " Justin Tobler
2025-07-28 20:52   ` Junio C Hamano

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).