From e918917360817e7bb58baae2bc166998ffdc8726 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Wed, 14 May 2025 09:52:44 -0400 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- Documentation/scalar.adoc | 13 ++++++------- scalar.c | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Documentation/scalar.adoc b/Documentation/scalar.adoc index 387527be1e..4bd5b150e8 100644 --- a/Documentation/scalar.adoc +++ b/Documentation/scalar.adoc @@ -14,7 +14,7 @@ scalar list scalar register [--[no-]maintenance] [] scalar unregister [] scalar run ( all | config | commit-graph | fetch | loose-objects | pack-files ) [] -scalar reconfigure [--maintenance=] [ --all | ] +scalar reconfigure [--maintenance=(enable|disable|keep)] [ --all | ] scalar diagnose [] scalar delete @@ -165,14 +165,13 @@ reconfigure the enlistment. registered with Scalar by the `scalar.repo` config key. Use this option after each upgrade to get the latest features. ---maintenance=:: +--maintenance=(enable|disable|keep):: By default, Scalar configures the enlistment to use Git's background maintenance feature; this is the same as using the - `--maintenance=enable` value for this option. Use the - `--maintenance=disable` to remove each considered enlistment - from background maintenance. Use `--maitnenance=keep' to leave - the background maintenance configuration untouched for These - repositories. + `enable` value for this option. Use the `disable` value to + remove each considered enlistment from background maintenance. + Use `keep' to leave the background maintenance configuration + untouched for these repositories. Diagnose ~~~~~~~~ diff --git a/scalar.c b/scalar.c index 847d2dd2f5..355baf75e4 100644 --- a/scalar.c +++ b/scalar.c @@ -675,12 +675,12 @@ static int cmd_reconfigure(int argc, const char **argv) OPT_BOOL('a', "all", &all, N_("reconfigure all registered enlistments")), OPT_STRING(0, "maintenance", &maintenance_str, - N_(""), + N_("(enable|disable|keep)"), N_("signal how to adjust background maintenance")), OPT_END(), }; const char * const usage[] = { - N_("scalar reconfigure [--maintenance=] [--all | ]"), + N_("scalar reconfigure [--maintenance=(enable|disable|keep)] [--all | ]"), NULL }; struct string_list scalar_repos = STRING_LIST_INIT_DUP; -- 2.39.5