history: fix short help for argument of --update-refs

"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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Apr 6, 2026 at 11:31 UTC 26b9946dd756a2efc29f898e53327676a22adc3e
1 file changed +4 -4
builtin/history.c
+4 -4
@@ -437,8 +437,8 @@ static int cmd_history_reword(int argc,
437 enum ref_action action = REF_ACTION_DEFAULT;
438 int dry_run = 0;
439 struct option options[] = {
440 - OPT_CALLBACK_F(0, "update-refs", &action, N_("<action>"),
441 - N_("control which refs should be updated (branches|head)"),
440 + OPT_CALLBACK_F(0, "update-refs", &action, "(branches|head)",
441 + N_("control which refs should be updated"),
442 PARSE_OPT_NONEG, parse_ref_action),
443 OPT_BOOL('n', "dry-run", &dry_run,
444 N_("perform a dry-run without updating any refs")),
@@ -666,8 +666,8 @@ static int cmd_history_split(int argc,
666 enum ref_action action = REF_ACTION_DEFAULT;
667 int dry_run = 0;
668 struct option options[] = {
669 - OPT_CALLBACK_F(0, "update-refs", &action, N_("<refs>"),
670 - N_("control ref update behavior (branches|head|print)"),
669 + OPT_CALLBACK_F(0, "update-refs", &action, "(branches|head)",
670 + N_("control ref update behavior"),
671 PARSE_OPT_NONEG, parse_ref_action),
672 OPT_BOOL('n', "dry-run", &dry_run,
673 N_("perform a dry-run without updating any refs")),