Commits
- Commit:
ae25a666dd4099105786ef32f1e6ebaf92abe64d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add some helper functions to compute hashes
This adds a set of functions to abstract over SHA1Init, SHA1Update,
SHA1Final, their respective SHA256 variants and how to compare digests.
Replace all the SHA1*() usage with the new APIs. It's a preparatory
step for sha256 handling.
ok stsp@
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
include sha2.h too where sha1.h is included
In preparation for wide sha256 support; stsp@ agrees. Change done
mechanically with
find . -iname \*.[cy] -exec sam {} +
X ,x/<sha1\.h>/i/\n#include <sha2.h>
- Commit:
ad4cc36168576274131539e87b9007ef9b3c3725
- From:
- Omar Polo <op@omarpolo.com>
- Date:
convert got_pack' filesize to off_t; ok stsp@
- Commit:
1c28a36116110db5de40e6edf09887651f3ca37b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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@
- Commit:
9316cc27bdc5db7db6927879f3c47b63f1c8ded2
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
switch integers used for counting objects while indexing pack files to unsigned
- Commit:
713d6e1144f1c1a21dd9013eab0cdf75a6b01ab8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
let callers of got_pack_index() configure the rate limit of progress reporting
- Commit:
0136599f8fc0aa5d26834c46a9b9feb48d12c726
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move pack indexing code into new file lib/pack_index.c
Prepares for sharing code between got-index-pack and future gotd(8).
- Commit:
5e91dae4dd43b8024731223110ab18f505f453ac
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove trailing whitespace; patch by Josiah Frentsos
- Commit:
ea8d9c76cc8fdc1dacfcc1cb952769fcd0930b10
- From:
- Omar Polo <op@omarpolo.com>
- Date:
convert two snprintf to strlcpy
"looks good to me" millert@
- Commit:
dac5c75ed0c009997c4b71cb83bfaebbfaff22f1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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@
- Commit:
d0f1e2f1b9f0e472831dc88cc9885c61d52c87f1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
apply time-based rate-limiting to got-index-pack progress output
- Commit:
8347f8e796a6f59deaf6f75275ae6e3d730fce9f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
plug memory leak in an error path of read_packed_object()
- Commit:
07965a0dfc49b585f5d2d6c2f8f645dfe3ef0d8c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix wrong function names in error messages from got-index-pack.c
- Commit:
d5c81d448ae4eec21053152e1c82c66eb11ca7a4
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
verify object ID checksums while loose objects are being accessed
- Commit:
dbdddfee1482b50ca8c4a0be06e4fec6a59fb9f4
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
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
- Commit:
85f4e1e7d36a206d3861d49c00e207d3e7fcab80
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix the type of variable 'idx' in update_packidx()
- Commit:
6059809a13b5d528052e38f84661039e6565f458
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use size_t for loop indices to avoid signedness warnings; by emaste@freebsd
Same change as 16aeacf7088d, for subdirectories other than lib/
- Commit:
1367695b58142d73ad701f34f04fe45c4ad2782b
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
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
- Commit:
23c57b285fdcf9a8a0a5913ea096232038bf0ac3
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
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
- Commit:
3168e5da215c7b442d231f40bfd61df067505d8b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
zap trailing tabs
- Commit:
78fb09675bee22e8ae24eb8bd9a86d8a04b17a7e
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
use the POSIX standard endian functions and explicitly include <endian.h>
ok stsp
- Commit:
81a12da58651e79380d81dea7020bf6af20bb28b
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
do not rely on <zlib.h> to pull in <unistd.h>
ok stsp
- Commit:
3abebdc26faf6005af348fa5146420b7cca61437
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make got-index-pack check the expected pack checksum passed from main process
- Commit:
6ad68bce3639912fcf7725dbb589febec015788a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make got-index-pack compute and verify the pack file's SHA1 checksum
- Commit:
e70bf110de343a3c1fc422b6682f56853686772f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move functions from privsep.c to the helpers which use them where possible