git/t/unit-tests
Seyi Kufoiji a06a725c78 oidmap: make entry cleanup explicit in oidmap_clear
Replace oidmap's use of hashmap_clear_() and layout-dependent freeing
with an explicit iteration and optional free callback. This removes
reliance on struct layout assumptions while keeping the existing API
intact.

Add tests for oidmap_clear_with_free behavior.
test_oidmap__clear_with_free_callback verifies that entries are freed
when a callback is provided, while
test_oidmap__clear_without_free_callback verifies that entries are not
freed when no callback is given. These tests ensure the new clear
implementation behaves correctly and preserves ownership semantics.

Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-05 11:16:18 -08:00
..
clar
.gitignore
generate-clar-decls.sh
generate-clar-suites.sh
lib-oid.c
lib-oid.h
lib-reftable.c
lib-reftable.h
test-lib.c
test-lib.h
u-ctype.c
u-dir.c
u-example-decorate.c
u-hash.c
u-hashmap.c
u-mem-pool.c
u-oid-array.c
u-oidmap.c oidmap: make entry cleanup explicit in oidmap_clear 2026-03-05 11:16:18 -08:00
u-oidtree.c
u-prio-queue.c
u-reftable-basics.c
u-reftable-block.c
u-reftable-merged.c
u-reftable-pq.c
u-reftable-readwrite.c
u-reftable-record.c
u-reftable-stack.c
u-reftable-table.c
u-reftable-tree.c
u-strbuf.c
u-strcmp-offset.c
u-string-list.c
u-strvec.c
u-trailer.c
u-urlmatch-normalization.c
u-utf8-width.c
unit-test.c
unit-test.h