object-file: split out logic regarding hash algorithms

While we have a "hash.h" header, the actual implementation of the
subsystem is hosted by "object-file.c". This makes it harder than
necessary to find the actual implementation of the hash subsystem and
intermingles the different concerns with one another.

Split out the implementation of hash algorithms into a new, separate
"hash.c" file.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-03-10 08:13:29 +01:00
committed by Junio C Hamano
parent 19be71db9c
commit 172d0f686b
4 changed files with 285 additions and 277 deletions

View File

@@ -310,6 +310,7 @@ libgit_sources = [
'graph.c',
'grep.c',
'hash-lookup.c',
'hash.c',
'hashmap.c',
'help.c',
'hex.c',