diff options
Diffstat (limited to 'reflog.h')
| -rw-r--r-- | reflog.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -2,6 +2,9 @@ #define REFLOG_H #include "refs.h" +#define REFLOG_EXPIRE_TOTAL (1 << 0) +#define REFLOG_EXPIRE_UNREACH (1 << 1) + struct reflog_expire_entry_option { struct reflog_expire_entry_option *next; timestamp_t expire_total; @@ -24,6 +27,20 @@ struct reflog_expire_options { .default_expire_unreachable = now - 90 * 24 * 3600, \ } +/* + * Parse the reflog expire configuration. This should be used with + * `repo_config()`. + */ +int reflog_expire_config(const char *var, const char *value, + const struct config_context *ctx, void *cb); + +/* + * Adapt the options so that they apply to the given refname. This applies any + * per-reference reflog expiry configuration that may exist to the options. + */ +void reflog_expire_options_set_refname(struct reflog_expire_options *cb, + const char *refname); + struct expire_reflog_policy_cb { enum { UE_NORMAL, |
