diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-23 13:44:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-23 13:44:46 -0700 |
commit | 28caad63d0f58611a22bf5b11e4914496ecb25b1 (patch) | |
tree | e93f71d16c3101bcd4b3fc17642dc1f540215774 /object-file.c | |
parent | 6c84b007c41638814137d296e75446a9b4865fd2 (diff) | |
parent | 09ef66179b943d03cbe0bea0603e5f40574695a1 (diff) | |
download | git-28caad63d0f58611a22bf5b11e4914496ecb25b1.tar.gz |
Merge branch 'rs/packfile-bad-object-list-in-oidset'
Replace a handcrafted data structure used to keep track of bad
objects in the packfile API by an oidset.
* rs/packfile-bad-object-list-in-oidset:
packfile: use oidset for bad objects
packfile: convert has_packed_and_bad() to object_id
packfile: convert mark_bad_packed_object() to object_id
midx: inline nth_midxed_pack_entry()
oidset: make oidset_size() an inline function
Diffstat (limited to 'object-file.c')
-rw-r--r-- | object-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/object-file.c b/object-file.c index c1f7ece055..be4f94ecf3 100644 --- a/object-file.c +++ b/object-file.c @@ -1642,7 +1642,7 @@ static int do_oid_object_info_extended(struct repository *r, return 0; rtype = packed_object_info(r, e.p, e.offset, oi); if (rtype < 0) { - mark_bad_packed_object(e.p, real->hash); + mark_bad_packed_object(e.p, real); return do_oid_object_info_extended(r, real, oi, 0); } else if (oi->whence == OI_PACKED) { oi->u.packed.offset = e.offset; @@ -1751,7 +1751,7 @@ void *read_object_file_extended(struct repository *r, die(_("loose object %s (stored in %s) is corrupt"), oid_to_hex(repl), path); - if ((p = has_packed_and_bad(r, repl->hash)) != NULL) + if ((p = has_packed_and_bad(r, repl)) != NULL) die(_("packed object %s (stored in %s) is corrupt"), oid_to_hex(repl), p->pack_name); obj_read_unlock(); |