From: "René Scharfe" <l.s.r@web.de>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>, Patrick Steinhardt <ps@pks.im>
Subject: [PATCH] history: fix short help for argument of --update-refs
Date: Mon, 6 Apr 2026 11:31:21 +0200 [thread overview]
Message-ID: <ff6a940c-39fc-4dbf-a164-7770c7f26a31@web.de> (raw)
"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
next reply other threads:[~2026-04-06 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-06 9:31 René Scharfe [this message]
2026-04-07 5:16 ` [PATCH] history: fix short help for argument of --update-refs Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff6a940c-39fc-4dbf-a164-7770c7f26a31@web.de \
--to=l.s.r@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox