From: René Scharfe Date: Mon, 6 Apr 2026 09:31:21 +0000 (+0200) Subject: history: fix short help for argument of --update-refs X-Git-Tag: v2.54.0-rc1~2^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26b9946dd756a2efc29f898e53327676a22adc3e;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- 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_(""), - 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_(""), - 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")),