Re: [PATCH 6/7] bulk-checkin: introduce `index_tree_bulk_checkin_incore()`
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 9, 2023, 01:31 UTC
- Message-ID
- <ZSNX5CQPWOy5B+cg@nand.local>
- In-Reply-To
- <E81727B0-A523-4A45-A606-61442357291D@gmail.com>
On Fri, Oct 06, 2023 at 10:07:20PM -0500, Eric Biederman wrote:
Show 26 quoted lines
> On October 6, 2023 5:02:04 PM CDT, Taylor Blau <me@ttaylorr.com> wrote:
> >Within `deflate_tree_to_pack_incore()`, the changes should be limited
> >to something like:
> >
> > if (the_repository->compat_hash_algo) {
> > struct strbuf converted = STRBUF_INIT;
> > if (convert_object_file(&compat_obj,
> > the_repository->hash_algo,
> > the_repository->compat_hash_algo, ...) < 0)
> > die(...);
> >
> > format_object_header_hash(the_repository->compat_hash_algo,
> > OBJ_TREE, size);
> >
> > strbuf_release(&converted);
> > }
> >
> >, assuming related changes throughout the rest of the bulk-checkin
> >machinery necessary to update the hash of the converted object, which
> >are likewise minimal in size.
>
> So this is close. Just in case someone wants to
> go down this path I want to point out that
> the converted object need to have the compat hash computed over it.
>
> Which means that the strbuf_release in your example comes a bit early.Doh. You're absolutely right. Let's fix this if/when we cross that bridge ;-).
Thanks, Taylor