From: Junio C Hamano <gitster@pobox.com>
To: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Cc: Karthik Nayak <karthik.188@gmail.com>,
Patrick Steinhardt <ps@pks.im>,
git@vger.kernel.org
Subject: Re: [PATCH v3 01/13] parse-options: allow for hidden aliases
Date: Tue, 15 Sep 2026 07:41:47 -0700 [thread overview]
Message-ID: <xmqq1pau37bo.fsf@gitster.g> (raw)
In-Reply-To: <c5266fff-8247-48d2-9679-3fc1f649cf34@gmail.com> (Kaartic Sivaraam's message of "Tue, 15 Sep 2026 15:02:21 +0530")
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
>> Perhaps it doesn't make sense to add flags to OPT_ALIAS() at all?
>> ...
>
> Just some food for thought. There are a couple of other instances where
> we are currently using OPT_ALIAS to represent the deprecated variant of
> an option. They are:
>
> 1. `--recursive` is a deprecated alias of `--recurse-submodule` in
> `git clone`
>
> cf. bb62e0a99f (clone: teach --recurse-submodules to optionally
> take a pathspec, 2017-03-17) and 5c387428f1 (parse-options: don't
> emit "ambiguous option" for aliases, 2019-04-29)
>
> 2. `--negotiation-tip` is a deprecated alias of
> `--negotiation-restrict` in `git fetch`
>
> cf. 1a445fc60b (fetch: add --negotiation-restrict option,
> 2026-05-19)
>
> Note: The documentation clarifies that --negotiation-restrict is
> the preferred variant but does not mention about deprecation.
>
> Since they are not hidden, the deprecated variants still show up in the
> help output of those commands. So, we appear to be doing fine with a
> public alias so far. So, may be it is not a big deal if we expose the
> deprecated option publicly?
The OPT_HIDDEN bit for an option indeed is a mechanism for
deprecation and it is not limited to alias.
When an option has a clearly better alternative, we would want to
eventually remove the old one and have everybody use the new one.
For that to happen, we need to let people know that the old thing is
on its way out, and "git cmd -h" is a good place to do so. We do
not want to use OPT_HIDDEN in earlier half of the deprecation.
After sufficient time passes, there will be a lot of new users who
are equally unfamiliar with old and new options. Telling them about
old way that is on its way out does not help them at all. So at
some point, we want to start using OPT_HIDDEN for such options.
When nobody uses the old option, we can remove the entry from the
options[] array, or we can keep it and use it only to cause an error
message (i.e., "This option used to do something, but no longer. Do
not use it anymore").
If OPT_ALIAS() does not allow using OPT_HIDDEN, that is a bug in the
infrastructure. It does not have to block a new topic that uses
OPT_ALIAS(), but we can leave a #leftoverbit mark to invite
interested parties to work on fixing it.
Thanks.
next prev parent reply other threads:[~2026-09-15 14:41 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 10:36 [PATCH 00/11] Fix inconsistent ref storage format terminology Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 01/11] builtin/init: rename "--ref-format=" to "--ref-storage=" Patrick Steinhardt
2026-09-04 13:05 ` Karthik Nayak
2026-09-07 10:00 ` Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 02/11] builtin/clone: " Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 03/11] builtin/refs: " Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 04/11] builtin/submodule: " Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 05/11] builtin/rev-parse: rename "--show-ref-format" to "--show-ref-storage" Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 06/11] help: rename "default-ref-format" to "default-ref-storage" Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 07/11] refs: expose function to parse reference URIs Patrick Steinhardt
2026-09-04 13:12 ` Karthik Nayak
2026-09-04 10:36 ` [PATCH 08/11] setup: refactor how we configure the ref storage format Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 09/11] setup: rename ref storage format environment variables Patrick Steinhardt
2026-09-04 13:20 ` Karthik Nayak
2026-09-07 10:00 ` Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 10/11] setup: rename "init.defaultRefFormat" to "init.defaultRefStorage" Patrick Steinhardt
2026-09-04 10:36 ` [PATCH 11/11] setup: allow "git init --ref-storage=" to specify a payload Patrick Steinhardt
2026-09-04 13:23 ` [PATCH 00/11] Fix inconsistent ref storage format terminology Karthik Nayak
2026-09-04 17:15 ` Junio C Hamano
2026-09-07 10:00 ` Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 " Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 01/11] builtin/init: rename "--ref-format=" to "--ref-storage-format=" Patrick Steinhardt
2026-09-08 9:01 ` Kaartic Sivaraam
2026-09-09 7:00 ` Patrick Steinhardt
2026-09-09 9:14 ` Kaartic Sivaraam
2026-09-07 11:18 ` [PATCH v2 02/11] builtin/clone: " Patrick Steinhardt
2026-09-08 9:21 ` Kaartic Sivaraam
2026-09-09 7:03 ` Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 03/11] builtin/refs: " Patrick Steinhardt
2026-09-08 10:55 ` Kaartic Sivaraam
2026-09-09 7:03 ` Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 04/11] builtin/submodule: " Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 05/11] builtin/rev-parse: rename "--show-ref-format" to "--show-ref-storage-format" Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 06/11] help: rename "default-ref-format" to "default-ref-storage-format" Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 07/11] refs: expose function to parse reference URIs Patrick Steinhardt
2026-09-08 13:47 ` Kaartic Sivaraam
2026-09-09 7:03 ` Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 08/11] setup: refactor how we configure the ref storage format Patrick Steinhardt
2026-09-09 8:00 ` Kaartic Sivaraam
2026-09-09 9:23 ` Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 09/11] setup: rename ref storage format environment variables Patrick Steinhardt
2026-09-09 8:10 ` Kaartic Sivaraam
2026-09-09 9:23 ` Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 10/11] setup: rename "init.defaultRefFormat" to "init.defaultRefStorageFormat" Patrick Steinhardt
2026-09-07 11:18 ` [PATCH v2 11/11] setup: allow "git init --ref-storage-format=" to specify a payload Patrick Steinhardt
2026-09-09 8:54 ` Kaartic Sivaraam
2026-09-09 9:23 ` Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 00/13] Fix inconsistent ref storage format terminology Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 01/13] parse-options: allow for hidden aliases Patrick Steinhardt
2026-09-14 9:33 ` Karthik Nayak
2026-09-15 9:32 ` Kaartic Sivaraam
2026-09-15 14:41 ` Junio C Hamano [this message]
2026-09-09 11:12 ` [PATCH v3 02/13] builtin/init: rename "--ref-format=" to "--ref-storage-format=" Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 03/13] builtin/clone: " Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 04/13] builtin/refs: " Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 05/13] builtin/submodule: " Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 06/13] builtin/rev-parse: rename "--show-ref-format" to "--show-ref-storage-format" Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 07/13] help: rename "default-ref-format" to "default-ref-storage-format" Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 08/13] refs: expose function to parse reference URIs Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 09/13] setup: refactor how we configure the ref storage format Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 10/13] setup: rename ref storage format environment variables Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 11/13] t: rename GIT_TEST_DEFAULT_REF_FORMAT Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 12/13] setup: rename "init.defaultRefFormat" to "init.defaultRefStorageFormat" Patrick Steinhardt
2026-09-09 11:12 ` [PATCH v3 13/13] setup: allow "--ref-storage-format=" to specify a payload Patrick Steinhardt
2026-09-14 9:37 ` [PATCH v3 00/13] Fix inconsistent ref storage format terminology Karthik Nayak
2026-09-14 16:38 ` Junio C Hamano
2026-09-14 15:08 ` Kaartic Sivaraam
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=xmqq1pau37bo.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kaartic.sivaraam@gmail.com \
--cc=karthik.188@gmail.com \
--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