diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-02-21 13:37:47 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-21 18:58:07 +0100 |
commit | d699d15c328b03fd822d3950f7ed76debef02c26 (patch) | |
tree | efe5b51cbcbfbcb92c994000d1c926ed79ab9197 /Documentation/git-reflog.txt | |
parent | refs: stop resolving ref corresponding to reflogs (diff) | |
download | git-d699d15c328b03fd822d3950f7ed76debef02c26.tar.xz git-d699d15c328b03fd822d3950f7ed76debef02c26.zip |
builtin/reflog: introduce subcommand to list reflogs
While the git-reflog(1) command has subcommands to show reflog entries
or check for reflog existence, it does not have any subcommands that
would allow the user to enumerate all existing reflogs. This makes it
quite hard to discover which reflogs a repository has. While this can
be worked around with the "files" backend by enumerating files in the
".git/logs" directory, users of the "reftable" backend don't enjoy such
a luxury.
Introduce a new subcommand `git reflog list` that lists all reflogs the
repository knows of to fill this gap.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-reflog.txt')
-rw-r--r-- | Documentation/git-reflog.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt index ec64cbff4c..a929c52982 100644 --- a/Documentation/git-reflog.txt +++ b/Documentation/git-reflog.txt @@ -10,6 +10,7 @@ SYNOPSIS -------- [verse] 'git reflog' [show] [<log-options>] [<ref>] +'git reflog list' 'git reflog expire' [--expire=<time>] [--expire-unreachable=<time>] [--rewrite] [--updateref] [--stale-fix] [--dry-run | -n] [--verbose] [--all [--single-worktree] | <refs>...] @@ -39,6 +40,8 @@ actions, and in addition the `HEAD` reflog records branch switching. `git reflog show` is an alias for `git log -g --abbrev-commit --pretty=oneline`; see linkgit:git-log[1] for more information. +The "list" subcommand lists all refs which have a corresponding reflog. + The "expire" subcommand prunes older reflog entries. Entries older than `expire` time, or entries older than `expire-unreachable` time and not reachable from the current tip, are removed from the reflog. |