expire_reflog(): treat the policy callback data as opaque
commitb729effbdbc9ae2d087a83b9e2a165fb8cc04641
authorMichael Haggerty <mhagger@alum.mit.edu>
Fri, 12 Dec 2014 08:56:58 +0000 (12 09:56 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Dec 2014 19:43:51 +0000 (12 11:43 -0800)
tree98ded82232dde75e4c2b91ab1466eacf1b7a5cba
parent82a645a73f07b19c0d70861929ebd6178e80e3e9
expire_reflog(): treat the policy callback data as opaque

Now that expire_reflog() doesn't actually look in the
expire_reflog_policy_cb data structure, we can make it opaque:

* Change the callers of expire_reflog() to pass it a pointer to an
  entire "struct expire_reflog_policy_cb" rather than a pointer to a
  "struct cmd_reflog_expire_cb".

* Change expire_reflog() to accept the argument as a "void *" and
  simply pass it through to the policy functions.

* Change the policy functions, reflog_expiry_prepare(),
  reflog_expiry_cleanup(), and should_expire_reflog_ent(), to accept
  "void *cb_data" arguments and cast them back to "struct
  expire_reflog_policy_cb" internally.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reflog.c