diff options
Diffstat (limited to 'refs/files-backend.c')
-rw-r--r-- | refs/files-backend.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 83ea080e01..298a838c5e 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -3207,7 +3207,7 @@ static int expire_reflog_ent(struct object_id *ooid, struct object_id *noid, if (cb->flags & EXPIRE_REFLOGS_REWRITE) ooid = &cb->last_kept_oid; - if ((*cb->should_prune_fn)(ooid->hash, noid->hash, email, timestamp, tz, + if ((*cb->should_prune_fn)(ooid, noid, email, timestamp, tz, message, policy_cb)) { if (!cb->newlog) printf("would prune %s", message); @@ -3244,6 +3244,7 @@ static int files_reflog_expire(struct ref_store *ref_store, int status = 0; int type; struct strbuf err = STRBUF_INIT; + struct object_id oid; memset(&cb, 0, sizeof(cb)); cb.flags = flags; @@ -3293,7 +3294,9 @@ static int files_reflog_expire(struct ref_store *ref_store, } } - (*prepare_fn)(refname, sha1, cb.policy_cb); + hashcpy(oid.hash, sha1); + + (*prepare_fn)(refname, &oid, cb.policy_cb); refs_for_each_reflog_ent(ref_store, refname, expire_reflog_ent, &cb); (*cleanup_fn)(cb.policy_cb); |