Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx> --- refs-be-files.c | 13 +++++++------ refs.c | 12 ++++++++++++ refs.h | 7 +++++++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index fdb47e0..93a5a33 100644 --- a/refs-be-files.c +++ b/refs-be-files.c @@ -3633,12 +3633,12 @@ static int expire_reflog_ent(unsigned char *osha1, unsigned char *nsha1, return 0; } -int reflog_expire(const char *refname, const unsigned char *sha1, - unsigned int flags, - reflog_expiry_prepare_fn prepare_fn, - reflog_expiry_should_prune_fn should_prune_fn, - reflog_expiry_cleanup_fn cleanup_fn, - void *policy_cb_data) +static int files_reflog_expire(const char *refname, const unsigned char *sha1, + unsigned int flags, + reflog_expiry_prepare_fn prepare_fn, + reflog_expiry_should_prune_fn should_prune_fn, + reflog_expiry_cleanup_fn cleanup_fn, + void *policy_cb_data) { static struct lock_file reflog_lock; struct expire_reflog_cb cb; @@ -3755,6 +3755,7 @@ struct ref_be refs_be_files = { files_reflog_exists, files_create_reflog, files_delete_reflog, + files_reflog_expire, files_resolve_ref_unsafe, files_verify_refname_available, files_pack_refs, diff --git a/refs.c b/refs.c index 7b2a47b..96fa699 100644 --- a/refs.c +++ b/refs.c @@ -1189,3 +1189,15 @@ int delete_reflog(const char *refname) { return the_refs_backend->delete_reflog(refname); } + +int reflog_expire(const char *refname, const unsigned char *sha1, + unsigned int flags, + reflog_expiry_prepare_fn prepare_fn, + reflog_expiry_should_prune_fn should_prune_fn, + reflog_expiry_cleanup_fn cleanup_fn, + void *policy_cb_data) +{ + return the_refs_backend->reflog_expire(refname, sha1, flags, + prepare_fn, should_prune_fn, + cleanup_fn, policy_cb_data); +} diff --git a/refs.h b/refs.h index 494f8c8..06089f8 100644 --- a/refs.h +++ b/refs.h @@ -618,6 +618,12 @@ typedef int (*reflog_exists_fn)(const char *refname); typedef int (*create_reflog_fn)(const char *refname, int force_create, struct strbuf *err); typedef int (*delete_reflog_fn)(const char *refname); +typedef int (*reflog_expire_fn)(const char *refname, const unsigned char *sha1, + unsigned int flags, + reflog_expiry_prepare_fn prepare_fn, + reflog_expiry_should_prune_fn should_prune_fn, + reflog_expiry_cleanup_fn cleanup_fn, + void *policy_cb_data); /* resolution functions */ typedef const char *(*resolve_ref_unsafe_fn)(const char *ref, @@ -673,6 +679,7 @@ struct ref_be { reflog_exists_fn reflog_exists; create_reflog_fn create_reflog; delete_reflog_fn delete_reflog; + reflog_expire_fn reflog_expire; resolve_ref_unsafe_fn resolve_ref_unsafe; verify_refname_available_fn verify_refname_available; pack_refs_fn pack_refs; -- 2.4.2.644.g97b850b-twtrsrc -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html