git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] pack-bitmap: gracefully handle missing BTMP chunks
Date: Mon, 15 Apr 2024 18:42:05 -0400	[thread overview]
Message-ID: <Zh2tPdvhQgD4342C@nand.local> (raw)
In-Reply-To: <ZhzKeR9C4UVpEm29@tanuki>

On Mon, Apr 15, 2024 at 08:34:33AM +0200, Patrick Steinhardt wrote:
> > Of course, that is still using a GIT_TEST_-variable, which is less than
> > ideal IMHO. The other alternative would be to store a MIDX file as a
> > test fixture in the tree (which we do in a couple of places). But with
> > the recent xz shenanigans, I'm not sure that's a great idea either ;-).
>
> I'm happy to convert this to use `GIT_TEST_MIDX_READ_BTMP` instead.

Thanks, I think that is definitely an improvement.

> > The way I would structure this series is to first apply the portion of
> > the above patch *without* these lines:
> >
> > -	if (bitmap_is_midx(bitmap_git)) {
> > +	if (!bitmap_is_midx(bitmap_git) ||
> > +	    !bitmap_git->midx->chunk_bitmapped_packs)
> > +		multi_pack_reuse = 0;
> > +
> >
> > , so we're still able to reproduce the issue. Then, apply the remaining
> > portions (the above diff, the test, and the GIT_TEST_MIDX_WRITE_BTMP
> > stuff) to demonstrate that the issue is fixed via a separate commit.
> >
> > I'm happy to write that up, and equally happy to not do it ;-). Sorry
> > for the lengthy review, but thank you very much for spotting and fixing
> > this issue.
>
> I'd prefer to leave it as a single patch. Junio has expressed at times
> that he doesn't see much value in these splits only to demonstrate a
> broken test. An interested reader can easily revert the fix and see that
> the test would fail.

Yeah, to be clear, I wasn't suggesting adding a test_expect_failure
here. I was suggesting instead that you do a refactoring that doesn't
change the behavior in the first step, and then add the test plus the
fix (after it is made easier to land by the first step) in the second
step.

But I don't feel strongly about it whatsoever, so I think that the new
version you have here is fine. I'll take a closer look at it right
now...

Thanks,
Taylor


  reply	other threads:[~2024-04-15 22:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  5:59 [PATCH] pack-bitmap: gracefully handle missing BTMP chunks Patrick Steinhardt
2024-04-10 15:02 ` Taylor Blau
2024-04-15  6:34   ` Patrick Steinhardt
2024-04-15 22:42     ` Taylor Blau [this message]
2024-04-15  6:41 ` [PATCH v2] " Patrick Steinhardt
2024-04-15  8:51   ` Patrick Steinhardt
2024-04-15 17:41     ` Junio C Hamano
2024-04-15 22:51       ` Taylor Blau
2024-04-15 23:46         ` Junio C Hamano
2024-04-15 22:51   ` Taylor Blau
2024-04-16  4:47     ` Patrick Steinhardt
2024-04-16  5:12       ` Jeff King
2024-04-16  5:14         ` Patrick Steinhardt

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=Zh2tPdvhQgD4342C@nand.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).