From 5e559cee72803599c5ec5ad9443c595131630ff0 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 24 Jan 2025 14:18:36 -0800 Subject: [PATCH] reflog: make count_reflog_ent() file-scope static The function has ever been used only as a helper function to implement reflog_delete(). As there are no external callers, we can make it file-scope static. Signed-off-by: Junio C Hamano --- reflog.c | 10 +++++----- reflog.h | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/reflog.c b/reflog.c index eeccd5fab4c74c..75759d3add2778 100644 --- a/reflog.c +++ b/reflog.c @@ -382,11 +382,11 @@ void reflog_expiry_cleanup(void *cb_data) free_commit_list(cb->mark_list); } -int count_reflog_ent(struct object_id *ooid UNUSED, - struct object_id *noid UNUSED, - const char *email UNUSED, - timestamp_t timestamp, int tz UNUSED, - const char *message UNUSED, void *cb_data) +static int count_reflog_ent(struct object_id *ooid UNUSED, + struct object_id *noid UNUSED, + const char *email UNUSED, + timestamp_t timestamp, int tz UNUSED, + const char *message UNUSED, void *cb_data) { struct cmd_reflog_expire_cb *cb = cb_data; if (!cb->expire_total || timestamp < cb->expire_total) diff --git a/reflog.h b/reflog.h index d2906fb9f8dd8b..fc777f23101232 100644 --- a/reflog.h +++ b/reflog.h @@ -32,9 +32,6 @@ void reflog_expiry_prepare(const char *refname, const struct object_id *oid, int should_expire_reflog_ent(struct object_id *ooid, struct object_id *noid, const char *email, timestamp_t timestamp, int tz, const char *message, void *cb_data); -int count_reflog_ent(struct object_id *ooid, struct object_id *noid, - const char *email, timestamp_t timestamp, int tz, - const char *message, void *cb_data); int should_expire_reflog_ent_verbose(struct object_id *ooid, struct object_id *noid, const char *email,