git/t/unit-tests
Karthik Nayak e35155588a reftable/stack: add function to check if optimization is required
The reftable backend performs auto-compaction as part of its regular
flow, which is required to keep the number of tables part of a stack at
bay. This allows it to stay optimized.

Compaction can also be triggered voluntarily by the user via the 'git
pack-refs' or the 'git refs optimize' command. However, currently there
is no way for the user to check if optimization is required without
actually performing it.

Extract out the heuristics logic from 'reftable_stack_auto_compact()'
into an internal function 'update_segment_if_compaction_required()'.
Then use this to add and expose `reftable_stack_compaction_required()`
which will allow users to check if the reftable backend can be
optimized.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-10 09:28:47 -08:00
..
clar t/unit-tests: update to 10e96bc 2025-09-22 10:09:03 -07:00
.gitignore
generate-clar-decls.sh
generate-clar-suites.sh
lib-oid.c
lib-oid.h
lib-reftable.c t/unit-tests: finalize migration of reftable-related tests 2025-07-24 11:46:04 -07:00
lib-reftable.h t/unit-tests: finalize migration of reftable-related tests 2025-07-24 11:46:04 -07:00
test-lib.c
test-lib.h
u-ctype.c
u-dir.c within_depth: fix return for empty path 2025-08-07 15:29:34 -07:00
u-example-decorate.c
u-hash.c
u-hashmap.c
u-mem-pool.c
u-oid-array.c
u-oidmap.c oidmap: rename oidmap_free() to oidmap_clear() 2025-05-12 13:06:26 -07:00
u-oidtree.c
u-prio-queue.c prio-queue: add prio_queue_replace() 2025-07-22 07:28:35 -07:00
u-reftable-basics.c reftable: check for trailing newline in 'tables.list' 2025-10-07 09:22:57 -07:00
u-reftable-block.c t/unit-tests: finalize migration of reftable-related tests 2025-07-24 11:46:04 -07:00
u-reftable-merged.c t/unit-tests: finalize migration of reftable-related tests 2025-07-24 11:46:04 -07:00
u-reftable-pq.c t/unit-tests: finalize migration of reftable-related tests 2025-07-24 11:46:04 -07:00
u-reftable-readwrite.c t/unit-tests: finalize migration of reftable-related tests 2025-07-24 11:46:04 -07:00
u-reftable-record.c t/unit-tests: finalize migration of reftable-related tests 2025-07-24 11:46:04 -07:00
u-reftable-stack.c reftable/stack: add function to check if optimization is required 2025-11-10 09:28:47 -08:00
u-reftable-table.c t/unit-tests: finalize migration of reftable-related tests 2025-07-24 11:46:04 -07:00
u-reftable-tree.c
u-strbuf.c
u-strcmp-offset.c
u-string-list.c string-list: optionally omit empty string pieces in string_list_split*() 2025-08-02 22:34:45 -07:00
u-strvec.c
u-trailer.c
u-urlmatch-normalization.c
unit-test.c
unit-test.h meson: ensure correct "clar-decls.h" header is used 2025-07-29 08:50:35 -07:00