Skip to contentSkip to conversation

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

PATCH In review René Scharfe 2 participants 2 messages Apr 6 – Apr 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
git history is a new command in the coming release.

 builtin/history.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
builtin/history.c +4 -4
index 568dc75ee7..9526938085 100644
@@ -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")),
Signature · 1 line
2.53.0
#1 lore raw
Quoted 3 lines · René Scharfe

"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