Commit Briefs
got send: show server error
Print the error message reported by the remote server when failing to update a branch (for e.g. because of a server-side check.) Reported by gonzalo@, with help and ok stsp@.
gotwebd: fix memleak in error path
ok stsp@
portable: release 0.79 (tags/0.79)
use sub-second precision when checking for objects/pack/ modification
Convert from st.m_time (second-precision time_t) to st.m_tim (struct timespec). To compensate for the potential case where a filesystem provides resolution in seconds only, always read the directory if no pack files are known to exist. Otherwise, there is a race condition when gotd repo_write creates a new pack and a request arrives for repo_read shortly after. Caught by a regression test for gotd on empty repositories. Test failure pointed out by Mikhail. ok op@
reduce delta cache size to avoid running out of memory on large pack files
As reported by Jerome Kasper, got-index-pack would run out of memory while cloning projects like LLVM or the Linux kernel. The delta cache was pushed to its maximum size limit of ~2GB, which is much higher than the default user data limit on OpenBSD. Set the delta cache size limits to values which should result in the cache limiting itself to 128MB or less.
zero-initialize all of struct got_deflate_buf in got_deflate_init()
Fixes a potential bogus free on error. got_deflate_end() relies on zb.flags to be initialized. It will try to free a bogus zb.outbuf pointer if zb.flags happens to set by uninitialized stack memory while we are calling got_deflate_end() in an error path.
zero-initialize all of struct got_inflate_buf in got_inflate_init()
Fixes a potential bogus free on error. got_inflate_end() relies on zb.flags to be initialized. It will try to free a bogus zb.outbuf pointer if zb.flags happens to set by uninitialized stack memory while we are calling got_inflate_end() in an error path.
portable: reorder system_extensions
Cosmetic change only. No functional changes expected. Via Anna (cybertailor) Vyalkova