git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
René Scharfe <l.s.r@web.de>
Date
Aug 19, 2018, 17:34 UTC
Message-ID
<34a13c2b-05a4-8788-de2a-d794bde1420d@web.de>

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(-)
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
Message 1 of 1 in “checkout-index: improve argument help for --stage”
  1. checkout-index: improve argument help for --stageRené Scharfe, Aug 19, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.