]> git.ipfire.org Git - thirdparty/git.git/commit
streaming.c: stop passing around "object_info *" to open()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 5 May 2021 12:33:31 +0000 (14:33 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 May 2021 03:56:09 +0000 (12:56 +0900)
commitde94c0eace41c9d93f6c2c97e98797afabb5932e
tree744ecc65f18c7b9c0ae03d25791001f7010a029f
parentbc062ad001f31a466d9aa3987005e34b3d9bbff4
streaming.c: stop passing around "object_info *" to open()

Change the streaming interface to stop passing around the "struct
object_info" the open() functions.

As seen in 7ef2d9a2604 (streaming: read non-delta incrementally from a
pack, 2011-05-13) which introduced the "st->u.in_pack" assignments
being changed here only the open_istream_pack_non_delta() path need
these.

So let's instead do this when preparing the selected callback in the
istream_source() function. This might also allow the compiler to
reduce the lifetime of the "oi" variable, as we've moved it from
"git_istream()" to "istream_source()".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
streaming.c