Commits


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