git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>,
	git@vger.kernel.org,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>,
	"Taylor Blau" <me@ttaylorr.com>
Subject: Re: [PATCH] scalar: accept -C and -c options before the subcommand
Date: Fri, 28 Jan 2022 10:05:31 -0800	[thread overview]
Message-ID: <xmqqv8y3wxas.fsf@gitster.g> (raw)
In-Reply-To: <0f8d5d04-e86c-48e2-fea0-32c25c3f9325@gmail.com> (Derrick Stolee's message of "Thu, 27 Jan 2022 09:46:55 -0500")

Derrick Stolee <stolee@gmail.com> writes:

> My understanding was that this was ejected so we could find the right time
> to lib-ify handle_options() (as Taylor suggested), but we didn't want to do
> that while Scalar was still in a tentative state (in contrib/ with a plan
> to move it out after more is implemented).
>
> The biggest benefits of using handle_options() is for other pre-command
> options such as --exec-path, which I use on a regular basis when testing
> new functionality.
>
> There are other options in handle_options() that might not be appropriate,
> or might be incorrect if we just make handle_options() non-static. For
> example, `scalar --list-cmds=parseopt` wouldn't show the scalar commands
> and would instead show the git commands.
>
> So my feeling is that we should continue to delay this functionality until
> Scalar is more stable, perhaps even until after it moves out of contrib/.
> The need to change handle_options() to work with a new top-level command
> is novel enough to be worth careful scrutiny, but that effort is only
> valuable if the Git community is more committed to having Scalar in the
> tree for the long term.

The usual caveat that little things tend to accumulate and you can
die from thousands of paper cuts aside, if "run in that directory"
and "pretend these configuration variables are set" are useful
enough features to Scalar, I think that the straight-forward option
parser this patch adds is very much acceptable.

If we need more options (i.e. when we need to add the third thing),
that would be the best time to see how handle_options() can be
restructured to serve the different set of options git and Scaler
need.

And this loop, which is too small to be even called "duplicated
implementation", should suffice in the meantime.



  parent reply	other threads:[~2022-01-28 18:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 11:15 [PATCH] scalar: accept -C and -c options before the subcommand Johannes Schindelin via GitGitGadget
2022-01-26 20:53 ` Taylor Blau
2022-01-28 11:43   ` Johannes Schindelin
2022-01-27  2:55 ` Ævar Arnfjörð Bjarmason
2022-01-27 14:46   ` Derrick Stolee
2022-01-28 11:27     ` Johannes Schindelin
2022-01-28 18:21       ` Ævar Arnfjörð Bjarmason
2022-01-28 19:52         ` Derrick Stolee
2022-01-29  6:39           ` Ævar Arnfjörð Bjarmason
2022-01-28 19:37       ` Derrick Stolee
2022-01-28 18:05     ` Junio C Hamano [this message]
2022-01-28 19:38       ` Derrick Stolee
2022-01-28 14:31 ` [PATCH v2] " Johannes Schindelin via GitGitGadget
2022-01-28 19:40   ` Derrick Stolee

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=xmqqv8y3wxas.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=me@ttaylorr.com \
    --cc=stolee@gmail.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).