Commit Briefs

ad4cc36168 Omar Polo

convert got_pack' filesize to off_t; ok stsp@


1c28a36116 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@




0136599f8f Stefan Sperling

move pack indexing code into new file lib/pack_index.c

Prepares for sharing code between got-index-pack and future gotd(8).


5e91dae4dd Stefan Sperling

remove trailing whitespace; patch by Josiah Frentsos


ea8d9c76cc Omar Polo

convert two snprintf to strlcpy

"looks good to me" millert@


dac5c75ed0 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@



8347f8e796 Stefan Sperling

plug memory leak in an error path of read_packed_object()




dbdddfee14 Christian Weisgerber

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


85f4e1e7d3 Stefan Sperling

fix the type of variable 'idx' in update_packidx()


6059809a13 Stefan Sperling

use size_t for loop indices to avoid signedness warnings; by emaste@freebsd

Same change as 16aeacf7088d, for subdirectories other than lib/


1367695b58 Christian Weisgerber

fix potential type mismatches between format specifiers and arguments

Cast printf arguments of type time_t and off_t to long long to match the %lld format specifier on platforms where this might not be the case. In parse.y, switch the number variable to long long because all its interactions are with that type anyway. ok millert stsp


23c57b285f Christian Weisgerber

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


3168e5da21 Stefan Sperling

zap trailing tabs


78fb09675b Christian Weisgerber

use the POSIX standard endian functions and explicitly include <endian.h>

ok stsp


81a12da586 Christian Weisgerber

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

ok stsp






18d4da0373 Stefan Sperling

tweak delta cache size in got-index-pack