Skip to main content

write_upload_pack_stream

Function write_upload_pack_stream 

Source
pub fn write_upload_pack_stream(
    repo: &Repository,
    wants: &[ObjectId],
    haves: &[ObjectId],
    source_shallow: &HashSet<ObjectId>,
    have_shallow: &HashSet<ObjectId>,
    filter: Option<&ObjectFilter>,
    opts: &PackBuildOptions,
    progress: &mut dyn FnMut(PackProgress),
    w: &mut dyn Write,
) -> Result<PackStats>
Expand description

Stream a pack for upload-pack: pack reuse when bitmaps allow, otherwise pack-objects.

The whole build runs in the odb’s pack read context, so planning and the pack-write workers share one set of pack caches. Filtered (partial clone) packs stream too.

§Errors

Missing wants, corrupt objects, or I/O failures while writing to w.