Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Taylor Blau <ttaylorr@openai.com>
Cc: "Taylor Blau" <me@ttaylorr.com>,
	git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"Jeff King" <peff@peff.net>, "Elijah Newren" <newren@gmail.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH 2/3] midx: pass custom '--base' through incremental writes
Date: Fri, 14 Aug 2026 09:27:44 +0200	[thread overview]
Message-ID: <an7DcGwWwjbq-C5a@pks.im> (raw)
In-Reply-To: <an4pffUrCY4xhTH2@com-79390>

On Thu, Aug 13, 2026 at 03:30:53PM -0500, Taylor Blau wrote:
> On Thu, Aug 13, 2026 at 10:49:00AM +0200, Patrick Steinhardt wrote:
> > > @@ -128,19 +128,33 @@ test_expect_success 'write MIDX layer with --base=none and --no-write-chain-file
> > >  		--no-write-chain-file --base=none)" &&
> > >
> > >  	test_cmp "$midx_chain.bak" "$midx_chain" &&
> > > -	test_path_is_file "$midxdir/multi-pack-index-$layer.midx"
> > > +	test_path_is_file "$midxdir/multi-pack-index-$layer.midx" &&
> > > +
> > > +	echo "$layer" >"$midx_chain" &&
> > > +	test-tool read-midx --show-objects "$objdir" "$layer" >midx.objects &&
> > > +	test_grep "^$(git rev-parse 2.2) " midx.objects &&
> > > +	cp "$midx_chain.bak" "$midx_chain"
> > >  '
> >
> > Would it make sense to also test for an object from the first MIDX layer
> > to be included? Otherwise we don't really assert that all layers are
> > included in the new MIDX.
> 
> I don't think that is necessary in this case, but let me know if I am
> missing something below.
> 
> The new layer is written with '--bitmap', and '--base=none' means that
> there is no base layer from which the bitmap can inherit objects. Since
> 1.2 is an ancestor of 2.2, writing a bitmap for the new layer already
> requires that it contain 1.2 and the rest of its reachable history.
> Otherwise bitmap generation would fail with the missing-closure error
> before we reached the assertion.
> 
> Checking 2.2 confirms that an object from the old tip was pulled into
> the new layer; the successful bitmap write already establishes that its
> objects from the earlier layer were pulled in, too.

I think that's a bit roundabout, as it simply tells us that the bitmap
was generated correctly, but not that the MIDX contains the objects. It
of course should if the bitmap was generated properly, but I would have
preferred if we verified the property directly.

Anyway, this is not a huge concern, more of a nitpick. Thanks!

Patrick

  reply	other threads:[~2026-08-14  7:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 20:07 [PATCH 0/3] midx: honor custom bases for incremental writes Taylor Blau
2026-06-12 20:07 ` [PATCH 1/3] t5334: expose shared `nth_line()` helper Taylor Blau
2026-08-13  8:48   ` Patrick Steinhardt
2026-08-13 19:28     ` Taylor Blau
2026-06-12 20:07 ` [PATCH 2/3] midx: pass custom '--base' through incremental writes Taylor Blau
2026-08-13  8:49   ` Patrick Steinhardt
2026-08-13 20:30     ` Taylor Blau
2026-08-14  7:27       ` Patrick Steinhardt [this message]
2026-06-12 20:07 ` [PATCH 3/3] midx-write: include packs above custom incremental base Taylor Blau
2026-08-13  8:49   ` Patrick Steinhardt
2026-08-13 20:50     ` Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=an7DcGwWwjbq-C5a@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=szeder.dev@gmail.com \
    --cc=ttaylorr@openai.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox