commit c5b519a9a281ccd2b4787f4409e7431fc66f92bc from: Omar Polo via: Thomas Adam date: Mon Feb 20 16:18:17 2023 UTC copy whole object id not only the sha1; missed in previous commits commit - 4c4f6843ebd869fa929b6407f1352bb545dd2ba1 commit + c5b519a9a281ccd2b4787f4409e7431fc66f92bc blob - 583ca55f32040db74e7183c9699d27a041461539 blob + 265520e5c67f452d52101dc8114d3b4b989d8ba1 --- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -677,8 +677,7 @@ commit_traversal_request(struct imsg *imsg, struct ims } commit_ids = new; } - memcpy(commit_ids[ncommits - 1].sha1, id.sha1, - SHA1_DIGEST_LENGTH); + memcpy(&commit_ids[ncommits - 1], &id, sizeof(id)); pid = STAILQ_FIRST(&commit->parent_ids); if (pid == NULL) @@ -747,7 +746,7 @@ commit_traversal_request(struct imsg *imsg, struct ims } if (!changed) { - memcpy(id.sha1, pid->id.sha1, SHA1_DIGEST_LENGTH); + memcpy(&id, &pid->id, sizeof(id)); got_object_commit_close(commit); commit = pcommit; pcommit = NULL;