Skip to content

Commit cbe4852

Browse files
avargitster
authored andcommitted
git reflog [expire|delete]: make -h output consistent with SYNOPSIS
Make use of the guaranteed pretty alignment of "-h" output added in my 4631cfc (parse-options: properly align continued usage output, 2021-09-21) and wrap and format the "git reflog [expire|delete] -h" usage output. Also add the missing "--single-worktree" option, as well as adding other things that were in the SYNOPSIS output, but not in the "-h" output. This was last touched in 33d7bdd (builtin/reflog.c: use parse-options api for expire, delete subcommands, 2022-01-06), but in that commit the previous usage() output was faithfully reproduced. Let's follow-up on that and make this even easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1e91d3f commit cbe4852

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

builtin/reflog.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
#include "reflog.h"
77

88
#define BUILTIN_REFLOG_EXPIRE_USAGE \
9-
N_("git reflog expire [--expire=<time>] " \
10-
"[--expire-unreachable=<time>] " \
11-
"[--rewrite] [--updateref] [--stale-fix] [--dry-run | -n] " \
12-
"[--verbose] [--all] <refs>...")
9+
N_("git reflog expire [--expire=<time>] [--expire-unreachable=<time>]\n" \
10+
" [--rewrite] [--updateref] [--stale-fix]\n" \
11+
" [--dry-run | -n] [--verbose] [--all [--single-worktree] | <refs>...]")
1312

1413
#define BUILTIN_REFLOG_DELETE_USAGE \
15-
N_("git reflog delete [--rewrite] [--updateref] " \
16-
"[--dry-run | -n] [--verbose] <refs>...")
14+
N_("git reflog delete [--rewrite] [--updateref]\n" \
15+
" [--dry-run | -n] [--verbose] <ref>@{<specifier>}...")
1716

1817
#define BUILTIN_REFLOG_EXISTS_USAGE \
1918
N_("git reflog exists <ref>")

0 commit comments

Comments
 (0)