Commits


remove dependency of gitwrapper, gotctl, and gotsh on object_parse.c Move some functions from object_parse.c into hash.c. These functions either require hash.c code anyway or contain object ID implementation internals. Add a new file object_qid.c, for got_object_id_queue and got_object_qid. This new file must be linked to virtually every program.


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@


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>


convert got_pack' filesize to off_t; ok stsp@


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@


switch integers used for counting objects while indexing pack files to unsigned


let callers of got_pack_index() configure the rate limit of progress reporting


move pack indexing code into new file lib/pack_index.c Prepares for sharing code between got-index-pack and future gotd(8).


remove trailing whitespace; patch by Josiah Frentsos


convert two snprintf to strlcpy "looks good to me" millert@


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@


apply time-based rate-limiting to got-index-pack progress output


plug memory leak in an error path of read_packed_object()


fix wrong function names in error messages from got-index-pack.c


verify object ID checksums while loose objects are being accessed