commit b685c8da4da0617ce1f98749fbd7014bda6d3fc3 from: Omar Polo date: Sun Feb 19 11:39:38 2023 UTC copy whole object id not only the sha1; missed in previous commits commit - 53e553e8ded01524f60c018b2266acc39af30669 commit + b685c8da4da0617ce1f98749fbd7014bda6d3fc3 blob - 9083934675b3b32e704eef4694a40efb00f02aa7 blob + 1cb98bf68ab578890b9806b248b38305052b2068 --- 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;