From: Derrick Stolee <stolee@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, johannes.schindelin@gmx.de,
Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v3 4/4] scalar reconfigure: add --maintenance=<mode> option
Date: Mon, 12 May 2025 14:02:26 -0400 [thread overview]
Message-ID: <82c2c073-3fa6-4023-82d5-bdb772c3790b@gmail.com> (raw)
In-Reply-To: <xmqqy0v1sp05.fsf@gitster.g>
On 5/12/2025 1:44 PM, Junio C Hamano wrote:
> Derrick Stolee <stolee@gmail.com> writes:
>
>> My intention was to bend over backwards to prevent a behavior change
>> in the default case. However, I'm coming around to understand that
>> we don't need this background maintenance to be redone every time
>> and can become a no-op by default. (Other new configuration will
>> still happen.)
>>
>> In the case where we're fine changing the default behavior, then
>> the standard --[no-]maintenance option will work, though it is a
>> three-way switch where the lack of its existence means "don't do
>> either mode".
>
> Ahh, OK. I misread your intention.
>
> If it is common for existing users to disable maintenance, perhaps
> by mistake, together with configuration changes that are not quite
> right, perhaps also by mistake, and if they used reconfigure to
> recover from such mistakes, it indeed may make sense to nuke the
> current setting and enable maintenance unconditionally.
The original intent of updating background maintenance in the
"reconfigure" command was primarily about updating the schedule, if
needed.
The recent bug in the macOS scheduler is a good example of this.
Users will need to rerun 'git maintenance start' somewhere in order
to get the "correct" schedule. This bug only needs this run for any
single repo, which makes the 'scalar reconfigure -a' command a
somewhat strange place to get the fix.
> As you suggested in a part of your response I omitted, we can
> annotate <mode> to give hints on the valid choices to help users,
> without changing the default behaviour. I am personally fine either
> way, as long as we clearly document the reasoning behind our design.
I'll create a new patch on top of the current series version that
does this, calling it out as an intentional pattern. It's previously
been used by these examples:
* --fixup=[(amend|reword):]<commit>
* --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
* --tool=[g,n,]vimdiff
* --exclude-hidden=[fetch|receive|uploadpack]
One place where this kind of notation could be helpful, but appears
to be absent, is the '-L(<n>:<m>)|(:<method>):<file>' argument for
'git log' and 'git rev-list'. Perhaps this is too dense, though, so
it would be better split into '-L<n>:<m>:<file>' and
'-L:<method>:<file>'.
Thanks,
-Stolee
next prev parent reply other threads:[~2025-05-12 18:02 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 10:24 [PATCH 0/2] scalar: add --no-maintenance option Derrick Stolee via GitGitGadget
2025-04-30 10:24 ` [PATCH 1/2] scalar register: " Derrick Stolee via GitGitGadget
2025-05-02 9:15 ` Patrick Steinhardt
2025-05-02 15:01 ` Derrick Stolee
2025-04-30 10:24 ` [PATCH 2/2] scalar clone: " Derrick Stolee via GitGitGadget
2025-04-30 20:28 ` [PATCH 0/2] scalar: " Junio C Hamano
2025-05-01 13:21 ` Derrick Stolee
2025-05-01 16:38 ` Junio C Hamano
2025-05-01 18:20 ` Junio C Hamano
2025-05-05 15:27 ` [PATCH v2 0/4] " Derrick Stolee via GitGitGadget
2025-05-05 15:27 ` [PATCH v2 1/4] scalar: customize register_dir()'s behavior Derrick Stolee via GitGitGadget
2025-05-05 15:27 ` [PATCH v2 2/4] scalar register: add --no-maintenance option Derrick Stolee via GitGitGadget
2025-05-05 15:27 ` [PATCH v2 3/4] scalar clone: " Derrick Stolee via GitGitGadget
2025-05-05 15:27 ` [PATCH v2 4/4] scalar reconfigure: " Derrick Stolee via GitGitGadget
2025-05-05 21:47 ` Junio C Hamano
2025-05-06 18:00 ` Derrick Stolee
2025-05-06 22:16 ` Junio C Hamano
2025-05-07 1:50 ` [PATCH v3 0/4] scalar: " Derrick Stolee via GitGitGadget
2025-05-07 1:50 ` [PATCH v3 1/4] scalar: customize register_dir()'s behavior Derrick Stolee via GitGitGadget
2025-05-07 1:50 ` [PATCH v3 2/4] scalar register: add --no-maintenance option Derrick Stolee via GitGitGadget
2025-05-07 1:50 ` [PATCH v3 3/4] scalar clone: " Derrick Stolee via GitGitGadget
2025-05-07 1:50 ` [PATCH v3 4/4] scalar reconfigure: add --maintenance=<mode> option Derrick Stolee via GitGitGadget
2025-05-07 21:46 ` Junio C Hamano
2025-05-12 14:34 ` Derrick Stolee
2025-05-12 17:44 ` Junio C Hamano
2025-05-12 18:02 ` Derrick Stolee [this message]
2025-05-14 12:28 ` Junio C Hamano
2025-05-14 13:52 ` [PATCH 5/4] scalar reconfigure: improve --maintenance docs Derrick Stolee
2025-05-14 22:16 ` Junio C Hamano
2025-05-16 16:36 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82c2c073-3fa6-4023-82d5-bdb772c3790b@gmail.com \
--to=stolee@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--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).