]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/system: stop depending on "hash.h"
authorPatrick Steinhardt <ps@pks.im>
Mon, 18 Nov 2024 15:33:57 +0000 (16:33 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Nov 2024 03:23:10 +0000 (12:23 +0900)
commitc2f08236ed786a48e50af33ecc5c0f951c14761b
tree2bf85fa99746b31ee4b1b3fc5d53bb5ce1c5ea6b
parent88e297275b94f2fbbc60b770f37654796799b907
reftable/system: stop depending on "hash.h"

We include "hash.h" in "reftable/system.h" such that we can use hash
format IDs as well as the raw size of SHA1 and SHA256. As we are in the
process of converting the reftable library to become standalone we of
course cannot rely on those constants anymore.

Introduce a new `enum reftable_hash` to replace internal uses of the
hash format IDs and new constants that replace internal uses of the hash
size. Adapt the reftable backend to set up the correct hash function.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
25 files changed:
refs/reftable-backend.c
reftable/basics.c
reftable/basics.h
reftable/merged.c
reftable/merged.h
reftable/reader.c
reftable/reader.h
reftable/reftable-basics.h
reftable/reftable-merged.h
reftable/reftable-reader.h
reftable/reftable-record.h
reftable/reftable-writer.h
reftable/stack.c
reftable/system.h
reftable/writer.c
t/helper/test-reftable.c
t/unit-tests/lib-reftable.c
t/unit-tests/lib-reftable.h
t/unit-tests/t-reftable-block.c
t/unit-tests/t-reftable-merged.c
t/unit-tests/t-reftable-pq.c
t/unit-tests/t-reftable-reader.c
t/unit-tests/t-reftable-readwrite.c
t/unit-tests/t-reftable-record.c
t/unit-tests/t-reftable-stack.c