diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-03-12 03:27:43 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-14 17:23:49 +0100 |
commit | d169d6644cec9bbb244c8300cadcd89afd4193cb (patch) | |
tree | 1a48fbf867cd41793bf9ab73201a1973b9777bb5 | |
parent | sha1_file: convert assert_sha1_type to object_id (diff) | |
download | git-d169d6644cec9bbb244c8300cadcd89afd4193cb.tar.xz git-d169d6644cec9bbb244c8300cadcd89afd4193cb.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | packfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packfile.c b/packfile.c index 7c1a2519fc..5f08aa0a14 100644 --- a/packfile.c +++ b/packfile.c @@ -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; |