Git development
 help / color / mirror / Atom feed
* [PATCH] history: fix short help for argument of --update-refs
@ 2026-04-06  9:31 René Scharfe
  2026-04-07  5:16 ` Patrick Steinhardt
  0 siblings, 1 reply; 2+ messages in thread
From: René Scharfe @ 2026-04-06  9:31 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano, Patrick Steinhardt

"print" is not a valid argument for --update-refs.  List both valid
alternatives literally in the argh string, consistent with documentation
and usage string.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
git history is a new command in the coming release.

 builtin/history.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/builtin/history.c b/builtin/history.c
index 568dc75ee7..9526938085 100644
--- a/builtin/history.c
+++ b/builtin/history.c
@@ -437,8 +437,8 @@ static int cmd_history_reword(int argc,
 	enum ref_action action = REF_ACTION_DEFAULT;
 	int dry_run = 0;
 	struct option options[] = {
-		OPT_CALLBACK_F(0, "update-refs", &action, N_("<action>"),
-			       N_("control which refs should be updated (branches|head)"),
+		OPT_CALLBACK_F(0, "update-refs", &action, "(branches|head)",
+			       N_("control which refs should be updated"),
 			       PARSE_OPT_NONEG, parse_ref_action),
 		OPT_BOOL('n', "dry-run", &dry_run,
 			 N_("perform a dry-run without updating any refs")),
@@ -666,8 +666,8 @@ static int cmd_history_split(int argc,
 	enum ref_action action = REF_ACTION_DEFAULT;
 	int dry_run = 0;
 	struct option options[] = {
-		OPT_CALLBACK_F(0, "update-refs", &action, N_("<refs>"),
-			       N_("control ref update behavior (branches|head|print)"),
+		OPT_CALLBACK_F(0, "update-refs", &action, "(branches|head)",
+			       N_("control ref update behavior"),
 			       PARSE_OPT_NONEG, parse_ref_action),
 		OPT_BOOL('n', "dry-run", &dry_run,
 			 N_("perform a dry-run without updating any refs")),
-- 
2.53.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] history: fix short help for argument of --update-refs
  2026-04-06  9:31 [PATCH] history: fix short help for argument of --update-refs René Scharfe
@ 2026-04-07  5:16 ` Patrick Steinhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick Steinhardt @ 2026-04-07  5:16 UTC (permalink / raw)
  To: René Scharfe; +Cc: Git List, Junio C Hamano

On Mon, Apr 06, 2026 at 11:31:21AM +0200, René Scharfe wrote:
> "print" is not a valid argument for --update-refs.  List both valid
> alternatives literally in the argh string, consistent with documentation
> and usage string.

This looks good to me, thanks!

Patrick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-07  5:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06  9:31 [PATCH] history: fix short help for argument of --update-refs René Scharfe
2026-04-07  5:16 ` Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox