Thread (69 messages) 69 messages, 6 authors, 2025-06-06

Re: [PATCH v4 04/12] builtin/maintenance: mark "--task=" and "--schedule=" as incompatible

From: Derrick Stolee <hidden>
Date: 2025-06-05 15:46:07
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

On 6/3/2025 10:01 AM, Patrick Steinhardt wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help