]> git.ipfire.org Git - thirdparty/git.git/commit
object-file: generalize packfile writes to use odb_write_stream
authorJustin Tobler <jltobler@gmail.com>
Thu, 14 May 2026 18:37:39 +0000 (13:37 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 May 2026 19:44:40 +0000 (04:44 +0900)
commit45a75d6187dd8e85470e70aaada6346576333370
tree023f3c1b45600434d4e3d18bfdc6886cb941d14c
parentd4c92e2ac975f256ccc207c65bf46e3be75a2115
object-file: generalize packfile writes to use odb_write_stream

The `index_blob_packfile_transaction()` function streams blob data
directly from an fd. This makes it difficult to reuse as part of a
generic transactional object writing interface.

Refactor the packfile write path to operate on a `struct
odb_write_stream`, allowing callers to supply data from arbitrary
sources.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
object-file.c