aboutsummaryrefslogtreecommitdiffstats
path: root/reflog.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-04-08 08:22:14 +0200
committerJunio C Hamano <gitster@pobox.com>2025-04-08 07:53:26 -0700
commit964f364de9935592ff187cdf26b87a75e762c26c (patch)
treee94974d0d978fcabc6f5dee65bd87f530378f464 /reflog.h
parent85658275702bad04c916e2709fe33d2efc6de5e4 (diff)
downloadgit-964f364de9935592ff187cdf26b87a75e762c26c.tar.gz
builtin/reflog: stop storing per-reflog expiry dates globally
As described in the preceding commit, the per-reflog expiry dates are stored in a global pair of variables. Refactor the code so that they are contained in `struct reflog_expire_options` to make the structure useful in other contexts. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reflog.h')
-rw-r--r--reflog.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/reflog.h b/reflog.h
index a9d464bbf8..b08780a30a 100644
--- a/reflog.h
+++ b/reflog.h
@@ -2,7 +2,15 @@
#define REFLOG_H
#include "refs.h"
+struct reflog_expire_entry_option {
+ struct reflog_expire_entry_option *next;
+ timestamp_t expire_total;
+ timestamp_t expire_unreachable;
+ char pattern[FLEX_ARRAY];
+};
+
struct reflog_expire_options {
+ struct reflog_expire_entry_option *entries, **entries_tail;
int stalefix;
int explicit_expiry;
timestamp_t default_expire_total;