Commits


when finding changed paths iterate tree entries in on-disk order for speed ok op, jamsek


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.


fix GOT_IMSG_COMMIT_TRAVERSAL_REQUEST The sending and receiving side are sending the data differently. It works now by chance since a struct got_object_id is "just" a SHA1_DIGEST_LENGTH sized buffer, but will break in the future. Furthermore, the structure of the data as described in got_lib_privsep.h is not respected, as the path_len field is not transmitted. Change it to send/receive a whole struct got_object_id, the path without the NUL and the proper length. (The path is also actually mandatory, so assert it too.) improvements + 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>


use struct got_object_id instead of sha1 digest in a few imsg change got_img_commit_painting_request, got_imsg_tag_object and the data of GOT_IMSG_TRAVERSED_COMMITS not to copy the sha1 digest to the imsg buffer and then from it to a new struct got_object_id but send directly the whole struct. ok stsp@


copy whole object id not only the sha1; missed in previous commits


style


got_imsg_raw_delta_request: use struct instead of buffer for id ok stsp@


got_imsg_packed_object: use struct instead of buffer for id ok stsp@


avoid traversing enumerated commits more than once in got-read-pack Keep track of parent commits that will be processed as part of looping over the commit queue provided by the main process, and do not add these commits to the queue again. Fixes pointless traversal of commits on the queue which will simply be skipped. The end result is the same either way. ok tracey


fix missing commits in pack files created with packed object enumeration got-read-pack forgot to send a tree-enumeration-done message to the main process if the tree of a given commit had already been traversed. The main process would then not add the corresponding commit to the pack file, even though it should be added. Found while using 'got send' towards gotd in order to populate an empty repository on the server with non-trivial history, where some commits always ended up missing due to this bug. ok tracey


avoid copying reused deltas to delta cache file; copy from pack file instead ok op@


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@


allow got_object_parse_tree to reuse entries buffer allocations for speed ok millert@


remove trailing whitespace; patch by Josiah Frentsos