Commits


reuse existing deltas when creating pack files tested by thomas, naddy, and myself


portable: add support for landlock landlock is a new set of linux APIs that is conceptually similar to unveil(2): the idea is to restrict what a process can do on a specified part of the filesystem. There are some differences in the behaviour: the major one being that the landlock ruleset is inherited across execve(2). This just restricts the libexec helpers by completely revoking ANY filesystem access; after all they are the biggest attack surface. got send/fetch/clone *may* end up spawning ssh(1), so at the moment is not possible to landlock the main process. From Omar Polo.


avoid the creation of new temporary files whenever a packed object is read This speeds up the creation of pack files by about 30%.


wrap overlong lines


fix some integers that had a slightly wrong type; patch by Omar Polo


add 'static' qualifier to local functions in got-read-pack; patch by Omar Polo


portable: add FreeBSD support This adds the capability to compile got-portable on FreeBSD.


portable: initial Linux compilation This commit modifies the GoT main branch to be able to compile it under linux.


don't scan pack index offsets for large values if pack file is < 2GB This saves an iteration over the entire h->offsets array when opening a pack index which should not contain large offsets in the first place. ok millert@


switch from SIMPLEQ to equivalent STAILQ macros The singly-linked tail queue macros were added to OpenBSD 6.9 and are more widely available on other systems. ok stsp


fix raw object size sent by got-read-pack


implement raw object data access; this will be required for packing


make close(2) failure checks consistent; check 'close() == -1' everywhere ok millert, naddy


make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere ok millert, naddy


indentation fixes


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


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


remove got_packidx_get_object_idx_sha1(); it is not actually needed


include the relevant object ID in NO_OBJ error messages where possible


move functions from privsep.c to the helpers which use them where possible


remove GOT_ERR_NOT_ABSPATH and fix existing users to deal with absolute paths


when "bad path" errors occur, always show the path in question


add support for first-parent history traversal to got-read-pack


add copyright year for files already touched in 2020


rename to parsed_tree_entries_free for clarity (don't use with got_tree_object)