Commit Briefs

Omar Polo

check size before calling mmap(2)

It's only a preparatory step, as checking whether a size_t is less than SIZE_MAX is moot. In a follow-up commit, however, the `filesize' field of the struct got_pack will become off_t and these checks will kick in. This also makes consistent how we guard mmap(2) against empty files. ok and improvements stsp@


Stefan Sperling

allow got_object_parse_tree to reuse entries buffer allocations for speed

ok millert@



Omar Polo

mark got_error_fmt as printf-like and fix the arisen errors

ok stsp@


Stefan Sperling

implement support for commit coloring in got-read-pack for speed

ok op, tracey



Stefan Sperling

fix a bug in got_privsep_send_object_idlist() exposed by recent changes

The old code did not work correctly if only a single object Id was to be sent to got-read-pack. Make got-read-pack error out if the list of commits for object enumeration is empty to catch this problem if it occurs again. Found by the send_basic test, which was failing with GOT_TEST_PACK=1 ok tracey


Stefan Sperling

let got-read-pack be explicit about whether it could enumerate all objects

This allows the main process to avoid looping over all object IDs again in case the pack file used for enumeration is complete. ok op@



Stefan Sperling

Bring back object enumeration inside got-read-pack as a fast path.

The problem that was found in the earlier version has been fixed. ok op@


Stefan Sperling

revert object enumeration in got-read-pack for now; needs more work

This implementation marked commits and trees as enumerated before all trees which they depend on were enumerated. This behaviour leads to incomplete pack files when a tree is only partially packed and got-read-pack hits a missing tree entry as a result. The algorithm must be reworked such that packed leave nodes are marked enumerated first, then bubble-up. Found by op@


Stefan Sperling

in enumeration_request(), use the correct index for tagged commit objects

Fixes an error where got-read-pack errors out with "bad object data" during 'got send' because we ended up handing a tag object to the commit object parser.


Stefan Sperling

implement object enumeration support in got-read-pack

ok op@


Stefan Sperling

convert delta cache to a hash table

This approach uses more memory but is much faster. To offset the additional memory usage somewhat the cache now stores very small deltas only. However, overall memory usage goes up. Hopefully we will find a way to reduce this later. ok op@