git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Aug 2020, #07; Thu, 27)

From
Taylor Blau <me@ttaylorr.com>
Date
Aug 28, 2020, 00:39 UTC
Message-ID
<20200828003940.GA80266@syl.lan>
In-Reply-To
<xmqqzh6foe44.fsf@gitster.c.googlers.com>
On Thu, Aug 27, 2020 at 04:36:43PM -0700, Junio C Hamano wrote:
Show 48 quoted lines
> Jeff King <peff@peff.net> writes:
>
> > On Thu, Aug 27, 2020 at 02:43:02PM -0700, Junio C Hamano 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
> >>
> >>  When a packfile is removed by "git repack", multi-pack-index gets
> >>  cleared; the code was taught to do so less aggressively by first
> >>  checking if the midx actually refers to a pack that no longer
> >>  exists.
> >>
> >>  Will merge to 'master'.
> >
> > This seems to break t7700 when run with midx support:
> >
> >   $ git checkout e08f7bb093
> >   HEAD is now at e08f7bb093 builtin/repack.c: invalidate MIDX only when necessary
> >
> >   $ make && (cd t && GIT_TEST_MULTI_PACK_INDEX=1 ./t7700-repack.sh -i)
> >   [...]
> >   + git repack -a -d
> >   Enumerating objects: 10, done.
> >   Counting objects: 100% (10/10), done.
> >   Delta compression using up to 16 threads
> >   Compressing objects: 100% (5/5), done.
> >   Writing objects: 100% (10/10), done.
> >   Total 10 (delta 1), reused 10 (delta 1), pack-reused 0
> >   fatal: error preparing packfile from multi-pack-index
> >   error: last command exited with $?=128
> >   not ok 6 - packed obs in alt ODB are repacked when local repo has packs
> >   #
> >   #		rm -f .git/objects/pack/* &&
> >   #		echo new_content >>file1 &&
> >   #		git add file1 &&
> >   #		test_tick &&
> >   #		git commit -m more_content &&
> >   #		git repack &&
> >   #		git repack -a -d &&
> >   #		test_no_missing_in_packs
> >
> > I didn't look into whether it's a bug in the actual code, or just a
> > weird interaction with the way GIT_TEST_MULTI_PACK_INDEX triggers
> > git-repack to write a midx. But either way we should figure that out
> > before it graduates.
>
> Thanks for stopping us ;-)

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.

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.

Thanks, Taylor

Previous: Junio C HamanoNext: Jeff King
Message 4 of 17 in “What's cooking in git.git (Aug 2020, #07; Thu, 27)”
  1. Junio C HamanoAug 27, 2020
  2. Jeff KingAug 27, 2020
  3. Junio C HamanoAug 27, 2020
  4. Taylor BlauAug 28, 2020
  5. Jeff KingAug 28, 2020
  6. Jeff KingAug 28, 2020
  7. Taylor BlauAug 28, 2020
  8. Elijah NewrenAug 28, 2020
  9. Matheus Tavares BernardinoAug 29, 2020
  10. ds/maintenance-part-[1-2] (was: What's cooking in git.git (Aug 2020, #07; Thu, 27))Derrick Stolee, Aug 28, 2020
  11. Hariom vermaAug 28, 2020
  12. Junio C HamanoAug 28, 2020
  13. Hariom vermaAug 29, 2020
  14. Hariom vermaAug 29, 2020
  15. Junio C HamanoAug 29, 2020
  16. Hariom vermaAug 29, 2020
  17. Junio C HamanoAug 29, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.