From: Emily Shaffer <emilyshaffer@google.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: ds/maintenance-part-3 (was Re: What's cooking in git.git (Nov 2020, #02; Mon, 9))
Date: Mon, 16 Nov 2020 15:56:42 -0800 [thread overview]
Message-ID: <20201116235642.GA15562@google.com> (raw)
In-Reply-To: <d0123439-236c-1a62-294b-a3373465eadb@gmail.com>
On Tue, Nov 10, 2020 at 08:31:35AM -0500, Derrick Stolee wrote:
>
> On 11/9/2020 6:42 PM, Junio C Hamano wrote:
> > * ds/maintenance-part-3 (2020-10-16) 8 commits
> > - maintenance: add troubleshooting guide to docs
> > - maintenance: use 'incremental' strategy by default
> > - maintenance: create maintenance.strategy config
> > - maintenance: add start/stop subcommands
> > - maintenance: add [un]register subcommands
> > - for-each-repo: run subcommands on configured repos
> > - maintenance: add --schedule option and config
> > - maintenance: optionally skip --auto process
> > (this branch is used by ds/maintenance-part-4.)
> >
> > Parts of "git maintenance" to ease writing crontab entries (and
> > other scheduling system configuration) for it.
> >
> > Will merge to 'next'?
>
> This hasn't changed for a while, and part-4 is also sitting
> after some initial feedback. I'd love for others to test
> these background maintenance activities in their home forks.
> I certainly have on all three platforms.
>
> Perhaps part-3 could merge to 'next' soonish? I know we
> discussed only merging part-3 and part-4 to 'master' at the
> same time, but it would be good to have part-3 start cooking
> in 'next' sooner than later, right?
Hiya, we found a bug in part-3 today!
Because 'git maintenance unregister' spins a child process to call 'git
config --unset maintenance.repo <cwd>', it actually fails if "cwd"
contains a POSIX regular expression special character:
git config [<file-option>] --unset name [value_regex]
You can demo it for yourself like so:
git init repro+for+maintenance
git maintenance register
git maintenance unregister
echo $? # returns '5'
git config --list --global
I see two paths forward:
1. Teach 'git config' to learn either which regex parser to use
(including fixed), or at least to learn "value isn't a regex", or
2. Don't spin a child process in 'git maintenance [un]register' and
instead just call the config API.
I'd suggest #2. The config API is very nice, and seems to have a simple
way to add or remove configs to your global file in just a couple of
lines. If there's a reason why it's not simpler to do it that way, it's
my fault for missing the review :)
- Emily
next prev parent reply other threads:[~2020-11-16 23:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 23:42 What's cooking in git.git (Nov 2020, #02; Mon, 9) Junio C Hamano
2020-11-10 0:44 ` Elijah Newren
2020-11-10 1:03 ` Jeff King
2020-11-10 13:31 ` ds/maintenance-part-3 (was Re: What's cooking in git.git (Nov 2020, #02; Mon, 9)) Derrick Stolee
2020-11-16 23:56 ` Emily Shaffer [this message]
2020-11-17 0:40 ` Junio C Hamano
2020-11-17 1:07 ` Emily Shaffer
2020-11-17 13:56 ` Derrick Stolee
2020-11-17 19:18 ` Emily Shaffer
2020-11-17 19:34 ` Junio C Hamano
2020-11-17 21:12 ` Derrick Stolee
2020-11-19 2:16 ` Junio C Hamano
2020-11-19 13:25 ` Derrick Stolee
2020-11-19 15:53 ` Derrick Stolee
2020-11-19 18:06 ` 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=20201116235642.GA15562@google.com \
--to=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).