From: Jeff King <peff@peff.net>
To: Taylor Blau <me@ttaylorr.com>
Cc: Derrick Stolee <dstolee@microsoft.com>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: What's cooking in git.git (Aug 2020, #07; Thu, 27)
Date: Fri, 28 Aug 2020 02:26:19 -0400 [thread overview]
Message-ID: <20200828062619.GA2100989@coredump.intra.peff.net> (raw)
In-Reply-To: <20200828003940.GA80266@syl.lan>
On Thu, Aug 27, 2020 at 08:39:40PM -0400, Taylor Blau wrote:
> > >> * tb/repack-clearing-midx (2020-08-26) 1 commit
> > >> (merged to 'next' on 2020-08-27 at a465875cbb)
> > >> + builtin/repack.c: invalidate MIDX only when necessary
> [...]
> Thanks indeed. I started looking into this tonight thinking that it'd be
> an easy fix, but I think there is a deeper bug that is worth
> investigating further.
I imagine this is part of it:
diff --git a/builtin/repack.c b/builtin/repack.c
index f10f52779c..2cc05f968a 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -134,7 +134,7 @@ static void remove_redundant_pack(const char *dir_name, const char *base_name)
{
struct strbuf buf = STRBUF_INIT;
struct multi_pack_index *m = get_multi_pack_index(the_repository);
- strbuf_addf(&buf, "%s.pack", base_name);
+ strbuf_addf(&buf, "%s.idx", base_name);
if (m && midx_contains_pack(m, buf.buf))
clear_midx_file(the_repository);
strbuf_insertf(&buf, 0, "%s/", dir_name);
but maybe that is just the "easy" part you meant. Several tests still
seem to fail, which I guess is the "deeper" part. :)
If I'm understanding midx_contains_pack() correctly, then the code
looking for ".pack" could never have matched, and we would never have
deleted a midx here. Which makes me wonder why the "repack removes
multi-pack-index when deleting packs" test ever succeeded.
> Let's eject this for now. If the bug turns out to be easier than I
> thought, I'll send the patch again, otherwise I'll send it with my
> larger series when that's ready.
It's in next, so the preferred path forward is generally to do a fix on
top. Unless it's so unsalvageable that we have to revert, but I doubt
that here.
-Peff
next prev parent reply other threads:[~2020-08-28 6:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 21:43 What's cooking in git.git (Aug 2020, #07; Thu, 27) Junio C Hamano
2020-08-27 23:34 ` Jeff King
2020-08-27 23:36 ` Junio C Hamano
2020-08-28 0:39 ` Taylor Blau
2020-08-28 6:26 ` Jeff King [this message]
2020-08-28 8:31 ` Jeff King
2020-08-28 18:09 ` Taylor Blau
2020-08-28 2:16 ` Elijah Newren
2020-08-29 4:28 ` Matheus Tavares Bernardino
2020-08-28 15:48 ` ds/maintenance-part-[1-2] (was: What's cooking in git.git (Aug 2020, #07; Thu, 27)) Derrick Stolee
2020-08-28 20:09 ` What's cooking in git.git (Aug 2020, #07; Thu, 27) Hariom verma
2020-08-28 20:51 ` Junio C Hamano
2020-08-29 13:26 ` Hariom verma
2020-08-29 10:13 ` Hariom verma
2020-08-29 18:28 ` Junio C Hamano
2020-08-29 13:20 ` Hariom verma
2020-08-29 18:59 ` Junio C Hamano
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=20200828062619.GA2100989@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.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.
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).