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

Re: What's cooking in git.git (Sep 2021, #02; Wed, 8)

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Sep 9, 2021, 02:59 UTC
Message-ID
<c0c24993-77e2-51a1-c352-0399c59f1f94@ramsayjones.plus.com>
In-Reply-To
<xmqqsfyf5b74.fsf@gitster.g>
On 08/09/2021 16:38, Junio C Hamano wrote:

test t5319-multi-pack-index.sh on 'seen' has been failing for several days, so I had a quick look tonight. This issue relates to the following two topics:

Show 11 quoted lines
> * jb/midx-revindex-fix (2021-08-23) 1 commit
>  - multi-pack-index: fix *.rev cleanups with --object-dir
> 
>  An implementation in "multi-pack-index write" that takes object
>  directory inconsistently used that and the object store of the
>  default repository, causing segfaults and possibly corrupting
>  repositories.
> 
>  On hold.
>  cf. <xmqqo89jbf49.fsf@gitster.g>
> 
...
Show 34 quoted lines
> * tb/multi-pack-bitmaps (2021-09-01) 27 commits
>  - p5326: perf tests for MIDX bitmaps
>  - p5310: extract full and partial bitmap tests
>  - midx: respect 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP'
>  - t7700: update to work with MIDX bitmap test knob
>  - t5319: don't write MIDX bitmaps in t5319
>  - t5310: disable GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP
>  - t0410: disable GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP
>  - t5326: test multi-pack bitmap behavior
>  - t/helper/test-read-midx.c: add --checksum mode
>  - t5310: move some tests to lib-bitmap.sh
>  - pack-bitmap: write multi-pack bitmaps
>  - pack-bitmap: read multi-pack bitmaps
>  - pack-bitmap.c: avoid redundant calls to try_partial_reuse
>  - pack-bitmap.c: introduce 'bitmap_is_preferred_refname()'
>  - pack-bitmap.c: introduce 'nth_bitmap_object_oid()'
>  - pack-bitmap.c: introduce 'bitmap_num_objects()'
>  - midx: avoid opening multiple MIDXs when writing
>  - midx: close linked MIDXs, avoid leaking memory
>  - midx: infer preferred pack when not given one
>  - midx: reject empty `--preferred-pack`'s
>  - midx: clear auxiliary .rev after replacing the MIDX
>  - midx: fix `*.rev` cleanups with `--object-dir`
>  - midx: disallow running outside of a repository
>  - Documentation: describe MIDX-based bitmaps
>  - pack-bitmap-write.c: free existing bitmaps
>  - pack-bitmap-write.c: gracefully fail to write non-closed bitmaps
>  - pack-bitmap.c: harden 'test_bitmap_walk()' to check type bitmaps
> 
>  The reachability bitmap file used to be generated only for a single
>  pack, but now we've learned to generate bitmaps for history that
>  span across multiple packfiles.
> 
>  Will merge to 'next'.

The merge commit 24cade3ceb ("Merge branch 'jb/midx-revindex-fix' into seen", 2021-09-07) basically takes two versions of the same patch and keeps both versions of the same test. The two patches are:

  - c575d4a2d9 ("multi-pack-index: fix *.rev cleanups with --object-dir",
    2021-08-23)
  - 426c00e454 ("midx: fix `*.rev` cleanups with `--object-dir`", 2021-08-31)
(the second patch is from the 'tb/multi-pack-bitmaps' branch).

The second patch even includes an acknowledgment of 'Original-patch-by: Johannes Berg <johannes@sipsolutions.net>' (ie the first patch).

  $ ./t5319-multi-pack-index.sh -i -v
...
  expecting success of 5319.19 'multi-pack-index *.rev cleanup with --object-dir':
...
  ok 19 - multi-pack-index *.rev cleanup with --object-dir
  expecting success of 5319.20 'multi-pack-index *.rev cleanup with --object-dir':
...
  fatal: not a git repository (or any of the parent directories): .git
...
  $

The 'fatal' message is issued by a call to 'nongit git multi-pack-index ... write' command, which implies that 'git multi-pack-index' dies when not run from a repository. When the original patch was written, that command would not have died, so somewhere between v2.33.0 and 'seen' (maybe as part of the 'tb/multi-pack-bitmaps' branch, I haven't looked), that was changed and that test no longer works.

If I had to change that test to take account of that change in behaviour, then it would look pretty much the same as the new test in Taylor's commit (and which can now be seen as test #19 above).

So, a solution would be to simply drop 'jb/midx-revindex-fix', since it has effectively been incorporated into Taylor's branch. You could also go the other way around, drop commit 426c00e454 from Taylor's branch and fix up the test in Johannes's patch ... :-P

Well, I only had a quick look so (hopefully) I haven't missed something obvious!

ATB, Ramsay Jones

Previous: Elijah NewrenNext: Junio C Hamano
Message 11 of 25 in “What's cooking in git.git (Sep 2021, #02; Wed, 8)”
  1. Junio C HamanoSep 8, 2021
  2. Taylor BlauSep 8, 2021
  3. Junio C HamanoSep 8, 2021
  4. Taylor BlauSep 9, 2021
  5. Jeff KingSep 8, 2021
  6. Azeem Bande-AliSep 8, 2021
  7. Junio C HamanoSep 8, 2021
  8. Philippe BlainSep 8, 2021
  9. Derrick StoleeSep 8, 2021
  10. Elijah NewrenSep 9, 2021
  11. Ramsay JonesSep 9, 2021
  12. Junio C HamanoSep 9, 2021
  13. js/scalar, was Re: What's cooking in git.git (Sep 2021, #02; Wed, 8)Johannes Schindelin, Sep 9, 2021
  14. Junio C HamanoSep 10, 2021
  15. rs/range-diff-avoid-segfault-with-I, was Re: What's cooking in git.git (Sep 2021, #02; Wed, 8)Johannes Schindelin, Sep 9, 2021
  16. js/retire-preserve-merges, was Re: What's cooking in git.git (Sep 2021, #02; Wed, 8)Johannes Schindelin, Sep 9, 2021
  17. Junio C HamanoSep 10, 2021
  18. mr/bisect-in-c-4, was Re: What's cooking in git.git (Sep 2021, #02; Wed, 8)Johannes Schindelin, Sep 9, 2021
  19. Junio C HamanoSep 10, 2021
  20. Johannes SchindelinSep 10, 2021
  21. lh/systemd-timers, was Re: What's cooking in git.git (Sep 2021, #02; Wed, 8)Johannes Schindelin, Sep 9, 2021
  22. ar/submodule-add-more, was Re: What's cooking in git.git (Sep 2021, #02; Wed, 8)Johannes Schindelin, Sep 9, 2021
  23. Junio C HamanoSep 10, 2021
  24. Ævar Arnfjörð BjarmasonSep 9, 2021
  25. Elijah NewrenSep 9, 2021

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.