Skip to content

Commit

Permalink
reflog: make count_reflog_ent() file-scope static
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
gitster committed Jan 24, 2025
1 parent 88cf274 commit 5e559ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 5 additions & 5 deletions reflog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions reflog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5e559ce

Please sign in to comment.