Commits


fix gotadmin/repository_admin


fix fallout; mostly struct got_object_id zeroing


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.


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


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


include sha2.h where sha1.h is included


gotd, gotadmin: install packfiles and index files as 0444 gotd used 0600 (due to mkstemps(3)), gotadmin 0644; change it to 0444 since packfiles shouldn't change once created. Mirrors what git does. ok stsp@


use mkstemps(3) instead of mkstemp(3) for opening named temporary files Allows 'got commit' to use a ".diff" suffix for temporary diff files. ok op@


let callers of got_pack_create() configure rate-limiting of progress reporting Needed by future gotd(8), where progress reports will be sent to a network socket, rather than a local terminal.


move got_opentempfd() call out of got_pack_create() Future gotd(8) needs to run got_pack_create() in a chroot environment, so we can no longer open new temporary files inside got_pack_create(). ok op@


make got_pack_create() write to a file descriptor instead of a stdio FILE The old code required a seekable output file. This conflicts with requirements of future gotd(8), which will write pack file data to network sockets. ok op@


remove trailing whitespace; patch by Josiah Frentsos


If the first readdir() returns NULL err is uninitialized. This can't happen in practice, but llvm's scan-build doesn't know this. OK stsp