reflog: rename cmd_reflog_expire_cb to reflog_expire_options

We're about to expose `struct cmd_reflog_expire_cb` via "reflog.h" so
that we can also use this structure in "builtin/gc.c". Once we make it
accessible to a wider scope though it becomes awkwardly named, as it
isn't only useful in the context of a callback. Instead, the function is
containing all kinds of options relevant to whether or not a reflog
entry should be expired.

Rename the structure to `reflog_expire_options` to prepare for this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-04-08 08:22:12 +02:00
committed by Junio C Hamano
parent 08bdfd4535
commit 2ed8008399
3 changed files with 36 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
#define REFLOG_H
#include "refs.h"
struct cmd_reflog_expire_cb {
struct reflog_expire_options {
int stalefix;
int explicit_expiry;
timestamp_t expire_total;
@@ -18,7 +18,7 @@ struct expire_reflog_policy_cb {
} unreachable_expire_kind;
struct commit_list *mark_list;
unsigned long mark_limit;
struct cmd_reflog_expire_cb cmd;
struct reflog_expire_options opts;
struct commit *tip_commit;
struct commit_list *tips;
unsigned int dry_run:1;