scalar reconfigure: improve --maintenance docs

The --maintenance option for 'scalar reconfigure' has three possible
values. Improve the documentation by specifying the option in the -h
help menu and usage information.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Derrick Stolee
2025-05-14 09:52:44 -04:00
committed by Junio C Hamano
parent a34fef86e0
commit e918917360
2 changed files with 8 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ scalar list
scalar register [--[no-]maintenance] [<enlistment>] scalar register [--[no-]maintenance] [<enlistment>]
scalar unregister [<enlistment>] scalar unregister [<enlistment>]
scalar run ( all | config | commit-graph | fetch | loose-objects | pack-files ) [<enlistment>] scalar run ( all | config | commit-graph | fetch | loose-objects | pack-files ) [<enlistment>]
scalar reconfigure [--maintenance=<mode>] [ --all | <enlistment> ] scalar reconfigure [--maintenance=(enable|disable|keep)] [ --all | <enlistment> ]
scalar diagnose [<enlistment>] scalar diagnose [<enlistment>]
scalar delete <enlistment> scalar delete <enlistment>
@@ -165,14 +165,13 @@ reconfigure the enlistment.
registered with Scalar by the `scalar.repo` config key. Use this registered with Scalar by the `scalar.repo` config key. Use this
option after each upgrade to get the latest features. option after each upgrade to get the latest features.
--maintenance=<mode>:: --maintenance=(enable|disable|keep)::
By default, Scalar configures the enlistment to use Git's By default, Scalar configures the enlistment to use Git's
background maintenance feature; this is the same as using the background maintenance feature; this is the same as using the
`--maintenance=enable` value for this option. Use the `enable` value for this option. Use the `disable` value to
`--maintenance=disable` to remove each considered enlistment remove each considered enlistment from background maintenance.
from background maintenance. Use `--maitnenance=keep' to leave Use `keep' to leave the background maintenance configuration
the background maintenance configuration untouched for These untouched for these repositories.
repositories.
Diagnose Diagnose
~~~~~~~~ ~~~~~~~~

View File

@@ -675,12 +675,12 @@ static int cmd_reconfigure(int argc, const char **argv)
OPT_BOOL('a', "all", &all, OPT_BOOL('a', "all", &all,
N_("reconfigure all registered enlistments")), N_("reconfigure all registered enlistments")),
OPT_STRING(0, "maintenance", &maintenance_str, OPT_STRING(0, "maintenance", &maintenance_str,
N_("<mode>"), N_("(enable|disable|keep)"),
N_("signal how to adjust background maintenance")), N_("signal how to adjust background maintenance")),
OPT_END(), OPT_END(),
}; };
const char * const usage[] = { const char * const usage[] = {
N_("scalar reconfigure [--maintenance=<mode>] [--all | <enlistment>]"), N_("scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | <enlistment>]"),
NULL NULL
}; };
struct string_list scalar_repos = STRING_LIST_INIT_DUP; struct string_list scalar_repos = STRING_LIST_INIT_DUP;