commit 2e17b4a13c5799df8b2f315a4e457d35a7571597 from: Omar Polo date: Sun Feb 12 11:16:25 2023 UTC rename pack{file,idx}_sha1 to _hash commit - a41a7d4af7426fd81c7dcb8b98dae1c7d9ea9acd commit + 2e17b4a13c5799df8b2f315a4e457d35a7571597 blob - efa475c109e9d2c29e6513913f23b931c3c49b42 blob + 24d85f2fa225eeb6a74df6629dfac15beadc10e2 --- lib/got_lib_pack.h +++ lib/got_lib_pack.h @@ -63,8 +63,8 @@ const struct got_error *got_pack_parse_object_type_and /* See Documentation/technical/pack-format.txt in Git. */ struct got_packidx_trailer { - u_int8_t packfile_sha1[SHA1_DIGEST_LENGTH]; - u_int8_t packidx_sha1[SHA1_DIGEST_LENGTH]; + u_int8_t packfile_hash[SHA1_DIGEST_LENGTH]; + u_int8_t packidx_hash[SHA1_DIGEST_LENGTH]; } __attribute__((__packed__)); struct got_packidx_object_id { blob - 2aa8a2b9cffabc5d5bde4b290258cfe254992bac blob + 49053c6e02a0f77183b4f81d91af1743137e194a --- lib/pack.c +++ lib/pack.c @@ -325,10 +325,10 @@ checksum: } } if (verify) { - got_hash_update(&ctx, h->trailer->packfile_sha1, + got_hash_update(&ctx, h->trailer->packfile_hash, got_hash_digest_length(algo)); got_hash_final(&ctx, hash); - if (got_hash_cmp(&ctx, hash, h->trailer->packidx_sha1) != 0) + if (got_hash_cmp(&ctx, hash, h->trailer->packidx_hash) != 0) err = got_error(GOT_ERR_PACKIDX_CSUM); } done: