sha1_file: convert retry_bad_packed_offset to struct object_id
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
e816caa07b
commit
d169d6644c
|
@ -1095,13 +1095,13 @@ static int retry_bad_packed_offset(struct packed_git *p, off_t obj_offset)
|
|||
{
|
||||
int type;
|
||||
struct revindex_entry *revidx;
|
||||
const unsigned char *sha1;
|
||||
struct object_id oid;
|
||||
revidx = find_pack_revindex(p, obj_offset);
|
||||
if (!revidx)
|
||||
return OBJ_BAD;
|
||||
sha1 = nth_packed_object_sha1(p, revidx->nr);
|
||||
mark_bad_packed_object(p, sha1);
|
||||
type = sha1_object_info(sha1, NULL);
|
||||
nth_packed_object_oid(&oid, p, revidx->nr);
|
||||
mark_bad_packed_object(p, oid.hash);
|
||||
type = sha1_object_info(oid.hash, NULL);
|
||||
if (type <= OBJ_NONE)
|
||||
return OBJ_BAD;
|
||||
return type;
|
||||
|
|
Loading…
Reference in New Issue