Commit Briefs

b3be78f908 Omar Polo

style: no-op change in practice

change so it matches the style used in the rest of the tree. ok stsp


2c52c623be Omar Polo

convert to use imsg_get_fd()

While here also fix a fd leak in got-read-pack. We were dup'ing imsg.fd without closing imsg.fd later; instead just use imsg_get_fd() to extract the file descriptor. Tested by falsifian and Kyle Ackerman, thanks! 'go ahead' stsp@


ae25a666dd Omar Polo

add some helper 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. Replace all the SHA1*() usage with the new APIs. It's a preparatory step for sha256 handling. ok stsp@


5822e79e39 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>


3c23f6cdb6 Omar Polo

introduce got_error_checksum

ok stsp@


a755a22cd4 Omar Polo

another memcmp -> got_object_id_cmp




08578a35f6 Stefan Sperling

make close(2) failure checks consistent; check 'close() == -1' everywhere

ok millert, naddy


56b63ca4ab Stefan Sperling

make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere

ok millert, naddy


23c57b285f Christian Weisgerber

Stop including <sys/syslimits.h> directly.

POSIX says the limits defined there are available from <limits.h>, which almost all affected source files already included anyway. ok millert stsp


81a12da586 Christian Weisgerber

do not rely on <zlib.h> to pull in <unistd.h>

ok stsp




cc62643986 Stefan Sperling

make got-read-blob account for header len in size check

Fixes "no space" error with blobs which happen to straddle the size boundary for in-memory handling.


4492af8432 Stefan Sperling

plug a memory leak in got-read-blob


638f902404 Stefan Sperling

rename got_error_prefix_errno() to got_error_from_errno()


656b1f76d3 joshua stein

while (1) -> for (;;)


230a42bdc6 joshua stein

got_error_from_errno -> got_error_prefix_errno

also add got_error_prefix_errno2 and got_error_prefix_errno3 which should hopefully all be merged into a single function with variadic args (but can't alloc mem)


3a6ce05aff Stefan Sperling

check for errors from close(2)


fb43ecf150 Stefan Sperling

check for errors from fclose()


5d56da8198 Stefan Sperling

happy new copyright year


ac544f8c6f Stefan Sperling

pass smallish blobs directly via imsg buffer


f392e333e6 Stefan Sperling

verify total size vs header length in got-read-blob


ebc55e2dfc Stefan Sperling

eliminate got_object_open() round-trip when opening blobs