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

[PATCH v2 2/2] parse-options: format argh like error messages

From
Junio C Hamano via GitGitGadget <gitgitgadget@gmail.com>
Date
Jan 6, 2021, 11:51 UTC
Message-ID
<c5f01b0eab1dd13d46ac344e362cd13e7bc365fc.1609933875.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.822.v2.git.1609933875.gitgitgadget@gmail.com>
From: Junio C Hamano <gitster@pobox.com>

"Keep it homogeneous across the repository" is in general a guideline that can be used to converge to a good practice, but we can be a bit more prescriptive in this case. Just like the messages we give die(_("...")) are formatted without the final full stop and without the initial capitalization, most of the argument help text are already formatted that way, and we want to encourage that as the house style.

Noticed-by: ZheNing Hu <adlternative@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 parse-options.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/parse-options.h b/parse-options.h
index 7030d8f3da6..ff6506a5047 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -82,9 +82,9 @@ typedef enum parse_opt_result parse_opt_ll_cb(struct parse_opt_ctx_t *ctx,
  *   stores pointers to the values to be filled.
  *
  * `argh`::
- *   token to explain the kind of argument this option wants. Keep it
- *   homogeneous across the repository. Should be wrapped by N_() for
- *   translation.
+ *   token to explain the kind of argument this option wants. Does not
+ *   begin in capital letter, and does not end with a full stop.
+ *   Should be wrapped by N_() for translation.
  *
  * `help`::
  *   the short help associated to what the option does.
-- 
gitgitgadget
Previous: 阿德烈 via GitGitGadgetNext: Derrick Stolee
Message 6 of 12 in “builtin/*: update usage format”
  1. builtin/*: update usage format阿德烈 via GitGitGadget, Dec 29, 2020
  2. Felipe ContrerasDec 29, 2020
  3. Re* [PATCH] builtin/*: update usage formatJunio C Hamano, Jan 6, 2021
  4. Derrick StoleeJan 6, 2021
  5. 0/2 builtin/*: update usage format阿德烈 via GitGitGadget, Jan 6, 2021
  6. 2/2 parse-options: format argh like error messagesJunio C Hamano via GitGitGadget, Jan 6, 2021
  7. Derrick StoleeJan 6, 2021
  8. 1/2 builtin/*: update usage formatZheNing Hu via GitGitGadget, Jan 6, 2021
  9. 0/2 builtin/*: update usage format阿德烈 via GitGitGadget, Jan 6, 2021
  10. 1/2 parse-options: format argh like error messagesJunio C Hamano via GitGitGadget, Jan 6, 2021
  11. 2/2 builtin/*: update usage formatZheNing Hu via GitGitGadget, Jan 6, 2021
  12. Junio C HamanoJan 6, 2021

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.