diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2014-12-12 09:56:43 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-12 11:42:59 -0800 |
commit | 55dfc8de1844e4295bc02d4a279a432e26dc4740 (patch) | |
tree | f62077c1818ecb4b70b8b41865c9b212a5141ebc /builtin | |
parent | 2c6207abbd6c430be06ddfef97d145d7e21446fb (diff) | |
download | git-55dfc8de1844e4295bc02d4a279a432e26dc4740.tar.gz git-55dfc8de1844e4295bc02d4a279a432e26dc4740.tar.xz |
expire_reflog(): it's not an each_ref_fn anymore
Prior to v1.5.4~14, expire_reflog() had to be an each_ref_fn because
it was passed to for_each_reflog(). Since then, there has been no
reason for it to implement the each_ref_fn interface. So...
* Remove the "unused" parameter (which took the place of "flags", but
was really unused).
* Declare the last parameter to be (struct cmd_reflog_expire_cb *)
rather than (void *).
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/reflog.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/reflog.c b/builtin/reflog.c index 2d85d260c..160541aa2 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -349,9 +349,9 @@ static int push_tip_to_list(const char *refname, const unsigned char *sha1, int return 0; } -static int expire_reflog(const char *ref, const unsigned char *sha1, int unused, void *cb_data) +static int expire_reflog(const char *ref, const unsigned char *sha1, + struct cmd_reflog_expire_cb *cmd) { - struct cmd_reflog_expire_cb *cmd = cb_data; struct expire_reflog_cb cb; struct ref_lock *lock; char *log_file, *newlog_path = NULL; @@ -663,7 +663,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix) for (i = 0; i < collected.nr; i++) { struct collected_reflog *e = collected.e[i]; set_reflog_expiry_param(&cb, explicit_expiry, e->reflog); - status |= expire_reflog(e->reflog, e->sha1, 0, &cb); + status |= expire_reflog(e->reflog, e->sha1, &cb); free(e); } free(collected.e); @@ -677,7 +677,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix) continue; } set_reflog_expiry_param(&cb, explicit_expiry, ref); - status |= expire_reflog(ref, sha1, 0, &cb); + status |= expire_reflog(ref, sha1, &cb); } return status; } @@ -748,7 +748,7 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix) cb.expire_total = 0; } - status |= expire_reflog(ref, sha1, 0, &cb); + status |= expire_reflog(ref, sha1, &cb); free(ref); } return status; |