]> git.ipfire.org Git - thirdparty/git.git/commit
global: adapt callers to use generic hash context helpers
authorPatrick Steinhardt <ps@pks.im>
Fri, 31 Jan 2025 12:55:31 +0000 (13:55 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 31 Jan 2025 18:06:11 +0000 (10:06 -0800)
commit0578f1e66aa381356bfe2f53decf3864d88d23d3
treeca26e9efacec048463fe529f72998ba59924f479
parentb2755c15e2359c5436de062bf33a155a99c72c03
global: adapt callers to use generic hash context helpers

Adapt callers to use generic hash context helpers instead of using the
hash algorithm to update them. This makes the callsites easier to reason
about and removes the possibility that the wrong hash algorithm is used
to update the hash context's state. And as a nice side effect this also
gets rid of a bunch of users of `the_hash_algo`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
19 files changed:
builtin/fast-import.c
builtin/index-pack.c
builtin/patch-id.c
builtin/receive-pack.c
builtin/unpack-objects.c
bulk-checkin.c
csum-file.c
diff.c
http-push.c
http.c
object-file.c
pack-check.c
pack-write.c
read-cache.c
rerere.c
t/helper/test-hash-speed.c
t/helper/test-hash.c
t/unit-tests/u-hash.c
trace2/tr2_sid.c