Commits


add missing algo to object id


fix fix follout


fix "handle both sha1 and sha256 in pack files"


fix pack checksum handling for sha256


fix fallout; mostly struct got_object_id zeroing


bump hash size and add algo field to got_object_id; fix a few places


add field to got_packidx to propagate the hash algo allows to drop all the `algo' hardcodings in lib/pack.c and pack_idx.c


handle both sha1 and sha256 object ids in pack files bump got_packidx_object_id so it can hold a sha256 digest and adapt the code to read the needed type of hash.


rename pack{file,idx}_sha1 to _hash


rename "sha1" field to "hash" done with X ,x/\.sha1/c/hash X ,x/->sha1/c/->hash in sam after loading all the C files; except for one manual tweak in hash.c


introduce more helpers to deal with different hash digests


add functions to compute hashes This adds a set of functions to abstract over SHA1Init, SHA1Update, SHA1Final, their respective SHA256 variants and how to compare digests. It's a preparatory step for sha256 pack handling.


rename lib/sha1.c to lib/hash.c


include sha2.h where sha1.h is included


avoid copying reused deltas to delta cache file; copy from pack file instead ok op@