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

Re: 'ds/test-multi-pack-index' vs. 'ab/commit-graph-progress'

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 25, 2018, 21:11 UTC
Message-ID
<87va5plois.fsf@evledraar.gmail.com>
In-Reply-To
<20181025111557.GL30222@szeder.dev>
On Thu, Oct 25 2018, SZEDER Gábor wrote:
Show 51 quoted lines
> when branch 'ds/test-multi-pack-index' is merged with
> 'ab/commit-graph-progress', IOW 'master', 'next', or 'pu',
> 'GIT_TEST_MULTI_PACK_INDEX=1 ./t6500-gc.sh' fails with:
>
>   expecting success:
>           git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&
>           test_must_be_empty stdout &&
>           test_line_count = 1 stderr &&
>           test_i18ngrep "Computing commit graph generation numbers" stderr
>
>   + git -c gc.writeCommitGraph=true gc --no-quiet
>   + test_must_be_empty stdout
>   + test_path_is_file stdout
>   + test -f stdout
>   + test -s stdout
>   + test_line_count = 1 stderr
>   + test 3 != 3
>   + wc -l
>   + test 16 = 1
>   + echo test_line_count: line count for stderr != 1
>   test_line_count: line count for stderr != 1
>   + cat stderr
>   error: packfile .git/objects/pack/pack-c67996b982e718f8e3fa70c5ff7db3cecf688bbb.pack index unavailable
>   error: packfile .git/objects/pack/pack-d4f2632c6a37149bb546b8b0cfbc56b8183cd0f8.pack index unavailable
>   error: packfile .git/objects/pack/pack-d4f2632c6a37149bb546b8b0cfbc56b8183cd0f8.pack index unavailable
>   error: packfile .git/objects/pack/pack-c67996b982e718f8e3fa70c5ff7db3cecf688bbb.pack index unavailable
>   error: packfile .git/objects/pack/pack-c67996b982e718f8e3fa70c5ff7db3cecf688bbb.pack index unavailable
>   error: packfile .git/objects/pack/pack-c67996b982e718f8e3fa70c5ff7db3cecf688bbb.pack index unavailable
>   error: packfile .git/objects/pack/pack-c67996b982e718f8e3fa70c5ff7db3cecf688bbb.pack index unavailable
>   error: packfile .git/objects/pack/pack-c67996b982e718f8e3fa70c5ff7db3cecf688bbb.pack index unavailable
>   error: packfile .git/objects/pack/pack-d4f2632c6a37149bb546b8b0cfbc56b8183cd0f8.pack index unavailable
>   error: packfile .git/objects/pack/pack-d4f2632c6a37149bb546b8b0cfbc56b8183cd0f8.pack index unavailable
>   error: packfile .git/objects/pack/pack-d4f2632c6a37149bb546b8b0cfbc56b8183cd0f8.pack index unavailable
>   error: packfile .git/objects/pack/pack-d4f2632c6a37149bb546b8b0cfbc56b8183cd0f8.pack index unavailable
>   error: packfile .git/objects/pack/pack-d4f2632c6a37149bb546b8b0cfbc56b8183cd0f8.pack index unavailable
>   error: packfile .git/objects/pack/pack-d4f2632c6a37149bb546b8b0cfbc56b8183cd0f8.pack index unavailable
>   error: packfile .git/objects/pack/pack-c67996b982e718f8e3fa70c5ff7db3cecf688bbb.pack index unavailable
>   Computing commit graph generation numbers:  25% (1/4)   ^MComputing commit graph generation numbers:  50% (2/4)   ^MComputing commit graph generation numbers:  75% (3/4)   ^MComputing commit graph generation numbers: 100% (4/4)   ^MComputing commit graph generation numbers: 100% (4/4), done.
>   + return 1
>   error: last command exited with $?=1
>   not ok 9 - gc --no-quiet
>
>
> I suspect these "packfile index unavailable" errors are a Bad Thing,
> but I didn't follow the MIDX development closely enough to judge.
> Surprisingly (to me), 'git gc' didn't exit with error despite these
> errors.
>
> Anyway, this test seems to be too fragile, because that
>
>   test_line_count = 1 stderr

Yeah maybe it's too fragile, on the other hand it caught what seems to be a bug under GIT_TEST_MULTI_PACK_INDEX=true, and the rest of the test suite passes, so there's that.

> line will trigger, when anything else during 'git gc' prints
> something.  And I find it quite strange that an option called
> '--no-quiet' only shows the commit-graph progress, but not the regular
> output of 'git gc'.

It's confusing, but the reason for this seeming discrepancy is that writing the commit-graph happens in-process, whereas the rest of the work done by git-gc (and its output) comes from subprocesses. Most of that output is from "git-repack" / "git-pack-objects" which doesn't pay the same attention to --quiet and --no-quiet, instead it checks isatty(). See cmd_pack_objects().

Previous: Derrick StoleeNext: SZEDER Gábor
Message 5 of 6 in “'ds/test-multi-pack-index' vs. 'ab/commit-graph-progress'”
  1. SZEDER GáborOct 25, 2018
  2. packfile: close multi-pack-index in close_all_packsDerrick Stolee, Oct 25, 2018
  3. SZEDER GáborOct 29, 2018
  4. Derrick StoleeOct 29, 2018
  5. Ævar Arnfjörð BjarmasonOct 25, 2018
  6. SZEDER GáborOct 29, 2018

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.