Subject: Re: [PATCH v3] bulk-checkin: only support blobs in index_bulk_checkin

From: "Eric W. Biederman" <[email-masked]>
Date: Wed, 27 Sep 2023 15:13:33 -0500

Taylor Blau <[email-masked]> writes:

> On Tue, Sep 26, 2023 at 02:48:31PM -0700, Junio C Hamano wrote:
>> > Avoid all of those future complications by limiting index_bulk_checkin
>> > to only work on blobs.
>>
>> Thanks.  Will queue.
>
> Hmm. I wonder if retaining some flexibility in the bulk-checkin
> mechanism may be worthwhile. We discussed at the Contributor's
> Summit[^1] today that the bulk-checkin system may be a good fit for
> packing any blobs/trees created by `merge-tree` or `replay` instead of
> writing them out as loose objects.
>
> Being able to write trees in addition to blobs is definitely important
> there, so we may want to wait on merging this down until that direction
> solidifies a bit more. (FWIW, I started working on that today and hope
> to have patches on the list in the next day or two).
>
> Alternatively, if there is an urgency to merge these down, we can always
> come back to it in the future and revert it if need be. Either way
> :-).

There are two things that index_bulk_checkin does.
- Handle objects that are too large to fit into a memory
- Place objects immediately in a pack.

Do I read things correctly that you want to take an object that is small
enough to fit into memory, and to immediately into a pack?

If so you essentially want write_object_file that directly writes to a
pack?

A version of write_object_file that that directly writes to a pack is
much easier than the chunking that index_bulk_checkin does.

Perhaps your version could be called index_pack_checkin?

Eric