From: Junio C Hamano Date: Wed, 16 Apr 2025 20:54:19 +0000 (-0700) Subject: Merge branch 'ps/maintenance-reflog-expire' X-Git-Tag: v2.50.0-rc0~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01a6e244f951c0372ef541069570bb6bcfefcca3;p=thirdparty%2Fgit.git Merge branch 'ps/maintenance-reflog-expire' "git maintenance" learns a new task to expire reflog entries. * ps/maintenance-reflog-expire: builtin/maintenance: introduce "reflog-expire" task builtin/gc: split out function to expire reflog entries builtin/reflog: make functions regarding `reflog_expire_options` public builtin/reflog: stop storing per-reflog expiry dates globally builtin/reflog: stop storing default reflog expiry dates globally reflog: rename `cmd_reflog_expire_cb` to `reflog_expire_options` --- 01a6e244f951c0372ef541069570bb6bcfefcca3 diff --cc builtin/reflog.c index a3652e69f1,5fea31f9c3..3acaf3e32c --- a/builtin/reflog.c +++ b/builtin/reflog.c @@@ -389,13 -259,13 +268,13 @@@ static int cmd_reflog_expire(int argc, for (i = 0; i < argc; i++) { char *ref; - struct expire_reflog_policy_cb cb = { .cmd = cmd }; + struct expire_reflog_policy_cb cb = { .opts = opts }; if (!repo_dwim_log(the_repository, argv[i], strlen(argv[i]), NULL, &ref)) { - status |= error(_("%s points nowhere!"), argv[i]); + status |= error(_("reflog could not be found: '%s'"), argv[i]); continue; } - set_reflog_expiry_param(&cb.cmd, ref); + reflog_expire_options_set_refname(&cb.opts, ref); status |= refs_reflog_expire(get_main_ref_store(the_repository), ref, flags, reflog_expiry_prepare,