]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/maintenance-reflog-expire'
authorJunio C Hamano <gitster@pobox.com>
Wed, 16 Apr 2025 20:54:19 +0000 (13:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Apr 2025 20:54:19 +0000 (13:54 -0700)
"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`

1  2 
Documentation/config/maintenance.adoc
Documentation/git-maintenance.adoc
builtin/gc.c
builtin/reflog.c
t/t7900-maintenance.sh

Simple merge
Simple merge
diff --cc builtin/gc.c
Simple merge
index a3652e69f1b6df7db19e85554f8852920b9c889b,5fea31f9c3cb981a63edf76011ab485a7255afaf..3acaf3e32c2714ad84855079bde28f35ea0d6995
@@@ -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,
Simple merge