Commit d169d664 authored by brian m. carlson's avatar brian m. carlson Committed by Junio C Hamano

sha1_file: convert retry_bad_packed_offset to struct object_id

Signed-off-by: brian m. carlson's avatarbrian m. carlson <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent e816caa0
...@@ -1095,13 +1095,13 @@ static int retry_bad_packed_offset(struct packed_git *p, off_t obj_offset) ...@@ -1095,13 +1095,13 @@ static int retry_bad_packed_offset(struct packed_git *p, off_t obj_offset)
{ {
int type; int type;
struct revindex_entry *revidx; struct revindex_entry *revidx;
const unsigned char *sha1; struct object_id oid;
revidx = find_pack_revindex(p, obj_offset); revidx = find_pack_revindex(p, obj_offset);
if (!revidx) if (!revidx)
return OBJ_BAD; return OBJ_BAD;
sha1 = nth_packed_object_sha1(p, revidx->nr); nth_packed_object_oid(&oid, p, revidx->nr);
mark_bad_packed_object(p, sha1); mark_bad_packed_object(p, oid.hash);
type = sha1_object_info(sha1, NULL); type = sha1_object_info(oid.hash, NULL);
if (type <= OBJ_NONE) if (type <= OBJ_NONE)
return OBJ_BAD; return OBJ_BAD;
return type; return type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment