summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorSeyi Kufoiji <kuforiji98@gmail.com>2026-03-05 11:05:25 +0100
committerJunio C Hamano <gitster@pobox.com>2026-03-05 11:16:18 -0800
commita06a725c7847840ac56c0e797a829ac13abbe350 (patch)
tree945daadd069596fe816184ddcdced52e36d8011b /t/t4013/diff.diff_initial..side
parent67ad42147a7acc2af6074753ebd03d904476118f (diff)
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>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions