aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-01-15 05:50:16 -0800
committerJunio C Hamano <gitster@pobox.com>2026-01-15 05:50:16 -0800
commitec16dde5c8c08fe6f26a2183a038e02ea7b2b25f (patch)
treefef31f79ec514c9429614e2518ea48874f2d0801 /odb
parentc8e1706e8dbe7a511c1fd85d5147a1722b4080f1 (diff)
parenta282a8f163fa70f9eacc880e6188141cef917058 (diff)
downloadgit-ec16dde5c8c08fe6f26a2183a038e02ea7b2b25f.tar.xz
Merge branch 'ps/packfile-store-in-odb-source' into ps/odb-for-each-object
* ps/packfile-store-in-odb-source: packfile: move MIDX into packfile store packfile: refactor `find_pack_entry()` to work on the packfile store packfile: inline `find_kept_pack_entry()` packfile: only prepare owning store in `packfile_store_prepare()` packfile: only prepare owning store in `packfile_store_get_packs()` packfile: move packfile store into object source packfile: refactor misleading code when unusing pack windows packfile: refactor kept-pack cache to work with packfile stores packfile: pass source to `prepare_pack()` packfile: create store via its owning source odb: properly close sources before freeing them builtin/gc: fix condition for whether to write commit graphs
Diffstat (limited to 'odb')
-rw-r--r--odb/streaming.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/odb/streaming.c b/odb/streaming.c
index 745cd486fb..4a4474f891 100644
--- a/odb/streaming.c
+++ b/odb/streaming.c
@@ -185,13 +185,12 @@ static int istream_source(struct odb_read_stream **out,
{
struct odb_source *source;
- if (!packfile_store_read_object_stream(out, odb->packfiles, oid))
- return 0;
-
odb_prepare_alternates(odb);
- for (source = odb->sources; source; source = source->next)
- if (!odb_source_loose_read_object_stream(out, source, oid))
+ for (source = odb->sources; source; source = source->next) {
+ if (!packfile_store_read_object_stream(out, source->packfiles, oid) ||
+ !odb_source_loose_read_object_stream(out, source, oid))
return 0;
+ }
return open_istream_incore(out, odb, oid);
}