summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-02 12:26:12 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-02 12:26:12 -0700
commitdb0babf9b2f807e6913b3591d04cb752b8219e9d (patch)
tree0931f79efd3cccb0089aed434d99dee32fe7fda4 /refs.c
parentfd13909eb63ef121824f243183db6b1f49ef1aed (diff)
parentc44afd67d2bcfc2958e7cc79d7064ab5fcfa468a (diff)
Merge branch 'ms/refs-optimize'
"git refs optimize" is added for not very well explained reason despite it does the same thing as "git pack-refs"... * ms/refs-optimize: t: add test for git refs optimize subcommand t0601: refactor tests to be shareable builtin/refs: add optimize subcommand doc: pack-refs: factor out common options builtin/pack-refs: factor out core logic into a shared library builtin/pack-refs: convert to use the generic refs_optimize() API reftable-backend: implement 'optimize' action files-backend: implement 'optimize' action refs: add a generic 'optimize' API
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index c164374c26..750e5db077 100644
--- a/refs.c
+++ b/refs.c
@@ -2304,6 +2304,11 @@ int refs_pack_refs(struct ref_store *refs, struct pack_refs_opts *opts)
return refs->be->pack_refs(refs, opts);
}
+int refs_optimize(struct ref_store *refs, struct pack_refs_opts *opts)
+{
+ return refs->be->optimize(refs, opts);
+}
+
int peel_iterated_oid(struct repository *r, const struct object_id *base, struct object_id *peeled)
{
if (current_ref_iter &&