Re: [PATCH v4 04/12] builtin/maintenance: mark "--task=" and "--schedule=" as incompatible
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jun 5, 2025, 15:46 UTC
- Message-ID
- <45805f9d-d59b-46ba-a5d6-040ee60e189b@gmail.com>
- In-Reply-To
- <20250603-b4-pks-maintenance-ref-lock-race-v4-4-52f5cf7b7e99@pks.im>
On 6/3/2025 10:01 AM, Patrick Steinhardt wrote:
Show 8 quoted lines
> The "--task=" option explicitly allows the user to say which maintenance > tasks should be run, whereas "--schedule=" only respects the maintenance > strategy configured for a specific repository. As such, it is not > sensible to accept both options at the same time. > > Mark them as incompatible with one another. While at it, also convert > the existing logic that marks "--auto" and "--schedule=" as incompatible > to use `die_for_incompatible_opt2()`.
This is a good change. Please consider squashing in this change to the documentation to match this expectation:
--- >8 ---
diff --git a/Documentation/git-maintenance.adoc b/Documentation/git-maintenance.adoc index 931f3e02e85..a901c46ce0e 100644 --- a/Documentation/git-maintenance.adoc +++ b/Documentation/git-maintenance.adoc @@ -193,6 +193,8 @@ OPTIONS config value. The tasks that are tested are those provided by the `--task=<task>` option(s) or those with `maintenance.<task>.enabled` set to true. ++ +The `--schedule` option cannot be used with the `--task` option. --quiet:: Do not report progress or other information over `stderr`. @@ -203,6 +205,8 @@ OPTIONS arguments are specified, then only the tasks with `maintenance.<task>.enabled` configured as `true` are considered. See the 'TASKS' section for the list of accepted `<task>` values. ++ +The `--task` option cannot be used with the `--schedule` option. --scheduler=auto|crontab|systemd-timer|launchctl|schtasks:: When combined with the `start` subcommand, specify the scheduler