summaryrefslogtreecommitdiff
path: root/reflog.c
AgeCommit message (Collapse)AuthorFilesLines
2022-04-04Merge branch 'ab/reflog-parse-options'Libravatar Junio C Hamano1-10/+10
"git reflog" command now uses parse-options API to parse its command line options. * ab/reflog-parse-options: reflog: fix 'show' subcommand's argv reflog [show]: display sensible -h output reflog: convert to parse_options() API reflog exists: use parse_options() API git reflog [expire|delete]: make -h output consistent with SYNOPSIS reflog: move "usage" variables and use macros reflog tests: add missing "git reflog exists" tests reflog: refactor cmd_reflog() to "if" branches reflog.c: indent argument lists
2022-03-23Merge branch 'ab/reflog-prep-fix'Libravatar Junio C Hamano1-0/+2
Regression fix. * ab/reflog-prep-fix: reflog: don't be noisy on empty reflogs
2022-03-17reflog.c: indent argument listsLibravatar Ævar Arnfjörð Bjarmason1-10/+10
When reflog.c was lib-ified in 7d3d226e700 (reflog: libify delete reflog function and helpers, 2022-03-02) these previously "static" functions were made non-"static", but the argument lists were not correspondingly indented according to our usual coding style. Let's do that. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-02reflog: libify delete reflog function and helpersLibravatar John Cai1-0/+432
Currently stash shells out to reflog in order to delete refs. In an effort to reduce how much we shell out to a subprocess, libify the functionality that stash needs into reflog.c. Add a reflog_delete function that is pretty much the logic in the while loop in builtin/reflog.c cmd_reflog_delete(). This is a function that builtin/reflog.c and builtin/stash.c can both call. Also move functions needed by reflog_delete and export them. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>