Commit Briefs

Omar Polo

add got_repo_get_object_format()

and use it to avoid hardcoding the digest type in a few places. ok stsp@


Omar Polo

provide functions to parse/serialize different hashes

it abstracts over the hash type and ensures that object ids are zero'ed before their sha1 digest is written. Needed by the incoming sha256 support. ok stsp@


Omar Polo

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

It will soon grow functions to deal with sha256 too. stsp@ agrees.


Omar Polo

include sha2.h too where sha1.h is included

In preparation for wide sha256 support; stsp@ agrees. Change done mechanically with find . -iname \*.[cy] -exec sam {} + X ,x/<sha1\.h>/i/\n#include <sha2.h>


Omar Polo

gotadmin pack: add a -D flag to force using ref-delta

Intended mostly for the regress suite, so we'll be able to test also the ref-delta code paths. ok stsp@


Omar Polo

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@


Stefan Sperling

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@


Stefan Sperling

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.


Stefan Sperling

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@


Stefan Sperling

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@



Florian Obser

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


Stefan Sperling

inline struct got_object_id in struct got_object_qid

Saves us from doing a malloc/free call for every item on the list. ok op@



Omar Polo

factorize imsg_clear calls after imsg_flush failures

imsg_clear frees and closes resources allocated as part of enqueueing imsgs so it's a no-op after reads. discussed with and ok stsp@