Commits


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.


verify object ID checksums while loose objects are being accessed


make got_packidx_get_packfile_path() usable for callers who only have a path


implement 'gotadmin cleanup'


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


raw object size should not include the length of the object's header This way, the size of a raw object is the same regardless of whether the object was found in a loose object file or in a pack file.


introduce got_object_id_queue_copy() This will be required by a future 'gotadmin pack' command.


introduce got_object_open_loose_fd() for library-internal use


add got_packidx_get_packfile_path() for library-internal use


fix open file descriptor leak in error path of read_object_header_privsep()


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


fix path existence check in got_object_tree_path_changed() A symptom of this was a segfault in 'got blame distrib/miniroot/install.sub' with the OpenBSD src.git from github, reported by jrick. The problem was that the commit graph traversed one commit too far. This could be more easily reproduced with 'got log': got log -c 05f568 -P distrib/miniroot/install.sub Which listed two commits instead of just the first one: 05f568ecc6aadefa1aff9064a29e798874a71409 <-- install.sub first created here 7c0d87f00e480cdf004324dad6f3e6f4418f8f42 "distrib/miniroot" exists in 7c0d87f00e480cdf004324... but not in the parent of this commit. Ensure that we traverse the full path in tree1 even if an intermediate tree2 cannot be opened. Instead of reporting success and a file change if we can't traverse further through tree2, we now hit this failing attempt to open the file 'install.sub' in tree object 180aa33df8d1 (tree1): te1 = find_entry_by_name(tree1, seg, seglen); if (te1 == NULL) { err = got_error(GOT_ERR_NO_OBJ); goto done; } fix tested and ok jrick


fix type of filesize output parameter of got_object_blob_dump_to_file()


reallocate line_offsets array less often in got_object_blob_dump_to_file()


decouple line_offsets/nlines output params of got_object_blob_dump_to_file()


handle non-const basename in resolve_symlink() ok millert


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


display more context info in "no such entry found in tree" error messages


errant tab found by tracey


initialize output parameter of got_object_blob_read_to_str(); found by ofree


add symlink support to 'got cherrypick'; test non-conflict cases only for now