From: Justin Tobler <jltobler@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im, Justin Tobler <jltobler@gmail.com>
Subject: [PATCH 0/2] builtin: unmark git-switch and git-restore as experimental
Date: Tue, 22 Jul 2025 13:08:16 -0500 [thread overview]
Message-ID: <20250722180818.1043014-1-jltobler@gmail.com> (raw)
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
next reply other threads:[~2025-07-22 18:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 18:08 Justin Tobler [this message]
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
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=20250722180818.1043014-1-jltobler@gmail.com \
--to=jltobler@gmail.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/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).