threads / patch / 57563

patchmaintenance: fix synopsis in documentation

Subject: [PATCH] maintenance: fix synopsis in documentation

## tl;dr

2 messages between Mar 15, 2022 and Mar 15, 2022. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Derrick Stolee via GitGitGadget· Mar 15, 2022, 17:41 UTC · lore
From: Derrick Stolee <derrickstolee@github.com>

The synopsis for 'git maintenance' did not include the commands other than the 'run' command. Update this to include the others. The 'start' command is the only one of these that parses additional options, and then only the --scheduler option.

Also move the 'register' command down after 'stop' and before 'unregister' for a logical grouping of the commands instead of an alphabetical one. The diff makes it look as three other commands are moved up.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
---
    maintenance: fix synopsis in documentation
    
    This is a quick fix for an issue I noticed during another review [1].
    
    Thanks, -Stolee
    
    [1]
    https://lore.kernel.org/git/dd9413da-1b8c-2adf-c471-e5fd4230375c@github.com/
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1178%2Fderrickstolee%2Fmaintenance-docs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1178/derrickstolee/maintenance-docs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1178
 Documentation/git-maintenance.txt | 38 ++++++++++++++++---------------
 1 file changed, 20 insertions(+), 18 deletions(-)
Show changes to Documentation/git-maintenance.txt +20 −18
diff --git a/Documentation/git-maintenance.txt b/Documentation/git-maintenance.txt
index e2cfb68ab57..e56bad28c65 100644
--- a/Documentation/git-maintenance.txt
+++ b/Documentation/git-maintenance.txt
@@ -10,6 +10,8 @@ SYNOPSIS
 --------
 [verse]
 'git maintenance' run [<options>]
+'git maintenance' start [--scheduler=<scheduler>]
+'git maintenance' (stop|register|unregister)
 
 
 DESCRIPTION
@@ -29,6 +31,24 @@ Git repository.
 SUBCOMMANDS
 -----------
 
+run::
+	Run one or more maintenance tasks. If one or more `--task` options
+	are specified, then those tasks are run in that order. Otherwise,
+	the tasks are determined by which `maintenance.<task>.enabled`
+	config options are true. By default, only `maintenance.gc.enabled`
+	is true.
+
+start::
+	Start running maintenance on the current repository. This performs
+	the same config updates as the `register` subcommand, then updates
+	the background scheduler to run `git maintenance run --scheduled`
+	on an hourly basis.
+
+stop::
+	Halt the background maintenance schedule. The current repository
+	is not removed from the list of maintained repositories, in case
+	the background maintenance is restarted later.
+
 register::
 	Initialize Git config values so any scheduled maintenance will
 	start running on this repository. This adds the repository to the
@@ -55,24 +75,6 @@ task:
 setting `maintenance.auto = false` in the current repository. This config
 setting will remain after a `git maintenance unregister` command.
 
-run::
-	Run one or more maintenance tasks. If one or more `--task` options
-	are specified, then those tasks are run in that order. Otherwise,
-	the tasks are determined by which `maintenance.<task>.enabled`
-	config options are true. By default, only `maintenance.gc.enabled`
-	is true.
-
-start::
-	Start running maintenance on the current repository. This performs
-	the same config updates as the `register` subcommand, then updates
-	the background scheduler to run `git maintenance run --scheduled`
-	on an hourly basis.
-
-stop::
-	Halt the background maintenance schedule. The current repository
-	is not removed from the list of maintained repositories, in case
-	the background maintenance is restarted later.
-
 unregister::
 	Remove the current repository from background maintenance. This
 	only removes the repository from the configured list. It does not

base-commit: 1a4874565fa3b6668042216189551b98b4dc0b1b
-- 
gitgitgadget
Junio C Hamano· Mar 15, 2022, 17:57 UTC · re: Derrick Stolee via GitGitGadget · lore

Re: [PATCH] maintenance: fix synopsis in documentation

"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 11 quoted lines
> From: Derrick Stolee <derrickstolee@github.com>
>
> The synopsis for 'git maintenance' did not include the commands other
> than the 'run' command. Update this to include the others. The 'start'
> command is the only one of these that parses additional options, and
> then only the --scheduler option.
>
> Also move the 'register' command down after 'stop' and before
> 'unregister' for a logical grouping of the commands instead of an
> alphabetical one. The diff makes it look as three other commands are
> moved up.
Will queue.  Thanks.

← back to recent threads