Commit Briefs
reuse existing deltas when creating pack files
tested by thomas, naddy, and myself
avoid the creation of new temporary files whenever a packed object is read
This speeds up the creation of pack files by about 30%.
add O_CLOEXEC (close-on-exec) flag to open(2) calls
suggested by millert ok thomas_adam
implement 'got diff -c' for diffing commits with optional filtering by path
Need for filtering by path sugggested by kn@ ok naddy@
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.
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