git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Alban Gruin <alban.gruin@gmail.com>
Cc: Eric Sunshine <sunshine@sunshineco.com>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH v1] git-clone.txt: add the --recursive option
Date: Tue, 14 Sep 2021 10:46:05 -0700	[thread overview]
Message-ID: <xmqqbl4v2gpu.fsf@gitster.g> (raw)
In-Reply-To: <d02c7f3b-221d-fbab-827a-a950bf28856c@gmail.com> (Alban Gruin's message of "Tue, 14 Sep 2021 12:27:44 +0200")

Alban Gruin <alban.gruin@gmail.com> writes:

> Junio did mention[0] that --recursive was no longer in the manual, but
> not that it was once hidden from the option list.

Please allow me to summarize the discussion so far.

We want our subcommands to take "--recurse-submodules=<arg>"
uniformly, while accepting any unique prefix, e.g. --recurs=<arg>,
as its short-hand.

For "git clone", we kept "--recurse=<it>" in the options[] table as
a HIDDEN entry as part of our deprecation plan.  This nicely hid the
deprecated "--recurse=<it>" from "git clone -h".

But it backfired because "git cmd --recur=<it>" was not a "unique
prefix" (as it matched both) and triggered a disambiguation error.
To solve it, we introduced OPT_ALIAS() to tell the machinery that
allows unique prefix that these two are the same thing.  As a side
effect, because the use of OPT_ALIAS() did not have HIDDEN bit, we
started showing the deprecated "--recurse" in "git clone -h" output.

Is that where we are?

I am wondering if it is just a matter of either

 * removing the "recursive" alias from the options table.  Because
   we accept unique prefix, --recurse=<arg> the user types will be
   taken as --recurse-submodules=<arg> anyway (until "git clone"
   learns another option --recurse-xyzzy=<arg>, at which time it
   will become ambiguous and error out, that is).

or

 * adding the PARSE_OPT_HIDDEN bit to the OPT_ALIAS() element for
   the deprecated "recurse" option.

and all would be fine?

Between adding "--recursive" to the manual and describing it as a
deprecated synonym for "--recurse-submodules", and not doing so, I
do not have a strong preference.

Thanks.


  reply	other threads:[~2021-09-14 17:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 18:59 [PATCH v1] git-clone.txt: add the --recursive option Alban Gruin
2021-09-13 19:26 ` Eric Sunshine
2021-09-13 20:42   ` Alban Gruin
2021-09-13 21:57     ` Eric Sunshine
2021-09-14 10:27       ` Alban Gruin
2021-09-14 17:46         ` Junio C Hamano [this message]
2021-09-14 17:53           ` Eric Sunshine
2021-09-14 18:31             ` Junio C Hamano
2021-09-14 20:21               ` Re* " Junio C Hamano
2021-09-13 21:43   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbl4v2gpu.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=alban.gruin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).