diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-02 12:26:12 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-02 12:26:12 -0700 |
| commit | db0babf9b2f807e6913b3591d04cb752b8219e9d (patch) | |
| tree | 0931f79efd3cccb0089aed434d99dee32fe7fda4 /refs/reftable-backend.c | |
| parent | Merge branch 'jt/odb-transaction' (diff) | |
| parent | t: add test for git refs optimize subcommand (diff) | |
| download | git-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/reftable-backend.c')
| -rw-r--r-- | refs/reftable-backend.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c index 9e889da2ff..9884b876c1 100644 --- a/refs/reftable-backend.c +++ b/refs/reftable-backend.c @@ -1741,6 +1741,12 @@ out: return ret; } +static int reftable_be_optimize(struct ref_store *ref_store, + struct pack_refs_opts *opts) +{ + return reftable_be_pack_refs(ref_store, opts); +} + struct write_create_symref_arg { struct reftable_ref_store *refs; struct reftable_stack *stack; @@ -2727,6 +2733,7 @@ struct ref_storage_be refs_be_reftable = { .transaction_abort = reftable_be_transaction_abort, .pack_refs = reftable_be_pack_refs, + .optimize = reftable_be_optimize, .rename_ref = reftable_be_rename_ref, .copy_ref = reftable_be_copy_ref, |
