All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: Victoria Dye via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Victoria Dye <vdye@github.com>,
	Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH v2 0/3] reset: make --no-refresh the only way to skip index refresh
Date: Thu, 24 Mar 2022 10:13:36 -0700	[thread overview]
Message-ID: <xmqqsfr7jmtb.fsf@gitster.g> (raw)
In-Reply-To: <6d424915-5c63-bebd-f3b5-f153a541d077@gmail.com> (Phillip Wood's message of "Thu, 24 Mar 2022 11:11:02 +0000")

Phillip Wood <phillip.wood123@gmail.com> writes:

> I should have been clearer in my comments that I think changing the
> option name no '--no-refresh' whilst retaining '--refresh' is 
> worthwhile. '--no-refresh' is the form that users will want most of
> the time and changing the option name means that the useful version
> will be shown by "reset -h".

I am OK with it shown as "--[no-]refresh" or even "--refresh" alone,
as long as the description describes the "refresh" behaviour and
makes it clear that it is the default, with the expectation that the
users know from other boolean options that "--option" listed in "-h"
would naturally take "--no-option".

But as posted, 

    $ rungit seen reset -h 2>&1 | grep refresh
        --refresh             skip refreshing the index after reset

the explanation given is for "--no-refresh" (which is wrong), so
we'd need some fix in the area.  We could rephrase it to read

        --refresh             refresh the index after reset (default)

but as you suggested, I think mimicking how existing commands with
"--no-<option>" are shown, e.g. builtlin/update-ref.c does
"--no-deref",

    $ git update-ref -h 2>&1 | grep deref
        --no-deref            update <refname> not the one it points to
    $ git grep 'OPT_BOOL.*"no-deref"'
    builtin/update-ref.c:		OPT_BOOL( 0 , "no-deref", &no_deref,

would be a good approach.

> The range-diff for the other changes looks good

Thanks.

#leftoverbit: we may want to discuss if it is a good idea to teach
OPT_BOOL() to list "--[no-]<option>" in "git cmd -h", instead of
just "--<option>".

  reply	other threads:[~2022-03-24 17:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 20:34 [PATCH 0/4] reset: make --no-refresh the only way to skip index refresh Victoria Dye via GitGitGadget
2022-03-21 20:34 ` [PATCH 1/4] reset: do not make '--quiet' disable " Victoria Dye via GitGitGadget
2022-03-23 15:59   ` Phillip Wood
2022-03-23 16:52     ` Victoria Dye
2022-03-21 20:34 ` [PATCH 2/4] reset: deprecate 'reset.quiet' config option Victoria Dye via GitGitGadget
2022-03-23 16:00   ` Phillip Wood
2022-03-21 20:34 ` [PATCH 3/4] reset: deprecate 'reset.refresh' " Victoria Dye via GitGitGadget
2022-03-23 16:02   ` Phillip Wood
2022-03-23 17:19     ` Victoria Dye
2022-03-21 20:34 ` [PATCH 4/4] reset: deprecate '--refresh', leaving only '--no-refresh' Victoria Dye via GitGitGadget
2022-03-23 16:02   ` Phillip Wood
2022-03-23 16:58     ` Victoria Dye
2022-03-23 18:17 ` [PATCH v2 0/3] reset: make --no-refresh the only way to skip index refresh Victoria Dye via GitGitGadget
2022-03-23 18:17   ` [PATCH v2 1/3] reset: do not make '--quiet' disable " Victoria Dye via GitGitGadget
2022-03-23 18:17   ` [PATCH v2 2/3] reset: remove 'reset.quiet' config option Victoria Dye via GitGitGadget
2022-03-23 18:18   ` [PATCH v2 3/3] reset: remove 'reset.refresh' " Victoria Dye via GitGitGadget
2022-03-23 19:26   ` [PATCH v2 0/3] reset: make --no-refresh the only way to skip index refresh Derrick Stolee
2022-03-23 21:41   ` Junio C Hamano
2022-03-24 11:11   ` Phillip Wood
2022-03-24 17:13     ` Junio C Hamano [this message]
2022-03-24 17:33       ` Junio C Hamano
2022-03-24 18:01         ` Victoria Dye
2022-03-24 20:36           ` Junio C Hamano
2022-03-25 15:04         ` Derrick Stolee
2022-03-25 16:35           ` 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=xmqqsfr7jmtb.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=phillip.wood123@gmail.com \
    --cc=vdye@github.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.