]> Kevux Git Server - rit/commit
csum-file.c: extract algop from hashfile_checksum_valid()
authorTaylor Blau <me@ttaylorr.com>
Thu, 23 Jan 2025 17:34:26 +0000 (12:34 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Jan 2025 18:28:16 +0000 (10:28 -0800)
commit5fcc683338e947d1226a9426174e7c48ce849c47
treef82df4632dbcf62074948c9143980051ab5fb823
parent48524fac643afd7ec70d43684902598ad6d5b954
csum-file.c: extract algop from hashfile_checksum_valid()

Perform a similar transformation as in the previous commit, but focused
instead on hashfile_checksum_valid(). This function does not work with a
hashfile structure itself, and instead validates the raw contents of a
file written using the hashfile API.

We'll want to be prepared for a similar change to this function in the
future, so prepare ourselves for that by extracting 'the_hash_algo' into
its own field for use within this function.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
csum-file.c