builtin/reflog: introduce subcommand to list reflogsps/reflog-list
commitd699d15c328b03fd822d3950f7ed76debef02c26
authorPatrick Steinhardt <ps@pks.im>
Wed, 21 Feb 2024 12:37:47 +0000 (21 13:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Feb 2024 17:58:07 +0000 (21 09:58 -0800)
treeefe5b51cbcbfbcb92c994000d1c926ed79ab9197
parent59c50a96c5d2e58f981e0ceceaeadd941d5a19b7
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>
Documentation/git-reflog.txt
builtin/reflog.c
t/t1410-reflog.sh