threads / patch / 49161

patchcheckout-index: improve argument help for --stage

Subject: [PATCH] checkout-index: improve argument help for --stage

## tl;dr

One message between Aug 19, 2018 and Aug 19, 2018. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

René Scharfe· Aug 19, 2018, 17:34 UTC · lore

Spell out all alternatives and avoid using a numerical range operator, as it is not mentioned in CodingGuidelines and the resulting string is still concise. Wrap them in parentheses to document clearly that the "--stage=" part is common among them.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 builtin/checkout-index.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to builtin/checkout-index.c +1 −1
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index a730f6a1aa..92e9d0d69f 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -172,7 +172,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
 			N_("write the content to temporary files")),
 		OPT_STRING(0, "prefix", &state.base_dir, N_("string"),
 			N_("when creating files, prepend <string>")),
-		{ OPTION_CALLBACK, 0, "stage", NULL, "1-3|all",
+		{ OPTION_CALLBACK, 0, "stage", NULL, "(1|2|3|all)",
 			N_("copy out the files from named stage"),
 			PARSE_OPT_NONEG, option_parse_stage },
 		OPT_END()
-- 
2.18.0

← back to recent threads