commit d4f6ce15740c83cf98f1c4b9ef7d055da35a7562 from: Omar Polo date: Sat Feb 04 14:04:08 2023 UTC fix got_object_id_hex for sha256 commit - 908439393effebf944461dc222b25d99e62d05f5 commit + d4f6ce15740c83cf98f1c4b9ef7d055da35a7562 blob - 74cd39adeed51e4d24a86b74d1072ef84947a588 blob + 24e74f6df4c9b3b6b43518b8056aafb24a552025 --- lib/object_parse.c +++ lib/object_parse.c @@ -114,7 +114,9 @@ got_object_id_str(char **outbuf, struct got_object_id char * got_object_id_hex(struct got_object_id *id, char *buf, size_t len) { - return got_sha1_digest_to_str(id->sha1, buf, len); + if (id->algo == GOT_HASH_SHA256) + return got_sha256_digest_to_str(id->hash, buf, len); + return got_sha1_digest_to_str(id->hash, buf, len); } void