From: Junio C Hamano <gitster@pobox.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Elijah Newren <newren@gmail.com>,
Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH] pack-bitmap.c: ensure pack validity for all reuse packs
Date: Wed, 18 Dec 2024 11:41:50 -0800 [thread overview]
Message-ID: <xmqqa5cspym9.fsf@gitster.g> (raw)
In-Reply-To: <7fdbfadc04926efc094633b238a55168c92e3d58.1734117577.git.me@ttaylorr.com> (Taylor Blau's message of "Fri, 13 Dec 2024 14:20:02 -0500")
Taylor Blau <me@ttaylorr.com> writes:
> @@ -445,18 +444,6 @@ static int open_midx_bitmap_1(struct bitmap_index *bitmap_git,
> }
> }
>
> - if (midx_preferred_pack(bitmap_git->midx, &preferred_pack) < 0) {
> - warning(_("could not determine MIDX preferred pack"));
> - goto cleanup;
> - }
> -
> - preferred = bitmap_git->midx->packs[preferred_pack];
> - if (!is_pack_valid(preferred)) {
> - warning(_("preferred pack (%s) is invalid"),
> - preferred->pack_name);
> - goto cleanup;
> - }
> -
> return 0;
This is a pure removal, not the block of code moved elsewhere. I am
having a hard time resolving the conflict between this one and what
f34db3f6 (pack-bitmap.c: open and store incremental bitmap layers,
2024-11-19) did to the same part of the file, which is:
@@ -459,13 +478,20 @@ static int open_midx_bitmap_1(struct bitmap_index *bitmap_git,
goto cleanup;
}
- preferred = bitmap_git->midx->packs[preferred_pack];
+ preferred = nth_midxed_pack(bitmap_git->midx, preferred_pack);
if (!is_pack_valid(preferred)) {
warning(_("preferred pack (%s) is invalid"),
preferred->pack_name);
goto cleanup;
}
+ if (midx->base_midx) {
+ bitmap_git->base = prepare_midx_bitmap_git(midx->base_midx);
+ bitmap_git->base_nr = bitmap_git->base->base_nr + 1;
+ } else {
+ bitmap_git->base_nr = 1;
+ }
+
return 0;
cleanup:
Both are from you, and I am guessing that you have tried all of your
topics in flight together, if not the other topics. I wonder what
we can do better to make sure the work a contributor has already
done (in this case, resolve interaction between two topics) is not
wasted and recreated (possibly incorrectly) by the maintainer.
Thanks.
next prev parent reply other threads:[~2024-12-18 19:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 19:20 [PATCH] pack-bitmap.c: ensure pack validity for all reuse packs Taylor Blau
2024-12-18 12:33 ` Jeff King
2024-12-18 19:41 ` Junio C Hamano [this message]
2024-12-18 23:49 ` Taylor Blau
2024-12-19 1:16 ` Junio C Hamano
2024-12-19 1:31 ` 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=xmqqa5cspym9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.com \
--cc=newren@gmail.com \
--cc=peff@peff.net \
--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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.