Commits


fixed un-initialized object id


fix fallout; mostly struct got_object_id zeroing


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


handle repository format version 1 and objectformat extension


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.


add an hash algo field to got_pack - maybe useless


adjust GOT_PACKIDX_NAMELEN for sha256 packs


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


add got_repo_get_object_format() ...and use it to avoid hardcoding the algo in a few places.


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


make 'got import' -I option match directory names with a trailing slash reported by Lucas on IRC, who sent a patch which this commit was based on ok jamsek


got-read-gitconfig: send key-value pairs for extensions Most extension allow only for a boolean value so the current behaviour of just sending the extension with a trueish value is fine. However, some extensions that we could eventually support (like "objectformat") have a string value. This is a preparatory step towards that. ok stsp@