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>
This commit is contained in:
committed by
Junio C Hamano
parent
8565827570
commit
964f364de9
8
reflog.h
8
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;
|
||||
|
||||
Reference in New Issue
Block a user