commit e1380e2807453e7f6feedf4b930146b511620427 from: Stefan Sperling date: Fri Jan 27 08:20:24 2023 UTC 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 commit - a003d5184726e721ca5313a722fc1a22d602e8b8 commit + e1380e2807453e7f6feedf4b930146b511620427 blob - dd9fcfea23f63268577c4d5b91298a5a5106c61a blob + 6f44f1ef778cf17b70dc0b2fb6bc9ae2a49a0ff3 --- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -1473,6 +1473,9 @@ enumeration_request(struct imsg *imsg, struct imsgbuf if (got_object_idset_contains(idset, tree_id)) { got_object_qid_free(qid); qid = NULL; + err = send_tree_enumeration_done(ibuf); + if (err) + goto done; continue; }