Commits


fix fallout; mostly struct got_object_id zeroing


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


bubble up the algo argument


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


inflate: support sha256


introduce more helpers to deal with different hash digests


provide functions to parse/serialize sha256 digest plus a generic helper it abstracts over the hash type. Needed by the incoming sha256 support.


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


include sha2.h where sha1.h is included


introduce got_error_checksum ok stsp@


introduce got_object_id_hex to replace some got_sha1_digest_to_str() It's an analogous to got_object_id_str but writes to the given buffer. ok + improvements by stsp@


use got_object_id_cmp instad of memcmp where possible in object_parse.c ok stsp@


fix typo: overlapping comparison always evaluates false ok stsp@


always cast ctype' is*() arguments to unsigned char ok stsp@


remove trailing whitespace; patch by Josiah Frentsos