Skip to content

Commit cbf498e

Browse files
jbrobstgitster
authored andcommitted
builtin/reflog.c: fix dry-run option short name
The documentation for reflog states that the --dry-run option of the expire and delete subcommands has a corresponding short name, -n. However, 33d7bdd (builtin/reflog.c: use parse-options api for expire, delete subcommands, 2022-01-06) did not include this short name in the new options parsing. Re-add the short name in the new dry-run option definitions. Signed-off-by: Josh Brobst <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 33d7bdd commit cbf498e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/reflog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
592592
int verbose = 0;
593593
reflog_expiry_should_prune_fn *should_prune_fn = should_expire_reflog_ent;
594594
const struct option options[] = {
595-
OPT_BIT(0, "dry-run", &flags, N_("do not actually prune any entries"),
595+
OPT_BIT('n', "dry-run", &flags, N_("do not actually prune any entries"),
596596
EXPIRE_REFLOGS_DRY_RUN),
597597
OPT_BIT(0, "rewrite", &flags,
598598
N_("rewrite the old SHA1 with the new SHA1 of the entry that now precedes it"),
@@ -728,7 +728,7 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix)
728728
int verbose = 0;
729729
reflog_expiry_should_prune_fn *should_prune_fn = should_expire_reflog_ent;
730730
const struct option options[] = {
731-
OPT_BIT(0, "dry-run", &flags, N_("do not actually prune any entries"),
731+
OPT_BIT('n', "dry-run", &flags, N_("do not actually prune any entries"),
732732
EXPIRE_REFLOGS_DRY_RUN),
733733
OPT_BIT(0, "rewrite", &flags,
734734
N_("rewrite the old SHA1 with the new SHA1 of the entry that now precedes it"),

0 commit comments

Comments
 (0)