mirror of
https://github.com/git/git.git
synced 2026-08-09 09:34:14 +00:00
packfile: thread odb_source_packed through packed_object_info()
Add an optional `struct odb_source_packed *source` parameter to `packed_object_info()` and `packed_object_info_with_index_pos()`. This parameter is unused at this point in time, but it will be used in a follow-up commit so that we can record the source of a specific object. Note that callers in "odb/source-packed.c" pass the already-available source, but all other callers pass `NULL` instead. This is fine though, as we only care about populating this info when called via the packed store. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
2ed34f72cf
commit
11c689b873
@@ -1538,7 +1538,7 @@ static int add_packed_commits(const struct object_id *oid,
|
||||
struct object_info oi = OBJECT_INFO_INIT;
|
||||
|
||||
oi.typep = &type;
|
||||
if (packed_object_info(pack, offset, &oi) < 0)
|
||||
if (packed_object_info(NULL, pack, offset, &oi) < 0)
|
||||
die(_("unable to get type of object %s"), oid_to_hex(oid));
|
||||
|
||||
return add_packed_commits_oi(oid, &oi, data);
|
||||
|
||||
Reference in New Issue
Block a user