aboutsummaryrefslogtreecommitdiffstats
path: root/refs.h
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.h
parentMerge branch 'jt/odb-transaction' (diff)
parentt: add test for git refs optimize subcommand (diff)
downloadgit-db0babf9b2f807e6913b3591d04cb752b8219e9d.tar.gz
git-db0babf9b2f807e6913b3591d04cb752b8219e9d.zip
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.h')
-rw-r--r--refs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index bc5d8427a5..4e6bd63aa8 100644
--- a/refs.h
+++ b/refs.h
@@ -483,6 +483,12 @@ struct pack_refs_opts {
int refs_pack_refs(struct ref_store *refs, struct pack_refs_opts *opts);
/*
+ * Optimize the ref store. The exact behavior is up to the backend.
+ * For the files backend, this is equivalent to packing refs.
+ */
+int refs_optimize(struct ref_store *refs, struct pack_refs_opts *opts);
+
+/*
* Setup reflog before using. Fill in err and return -1 on failure.
*/
int refs_create_reflog(struct ref_store *refs, const char *refname,