git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 17:34 UTC

Re: [GSoC PATCH v2] backfill: add --[no-]progress option

From
Tian Yuchen <cat@malon.dev>
Date
Apr 15, 2026, 17:04 UTC
Message-ID
<21c10a52-82f4-4aa0-9027-21bb660b54cc@malon.dev>
In-Reply-To
<20260412193659.26288-1-viking4@gmail.com>
On 4/13/26 03:36, Trieu Huynh wrote:
Show 7 quoted lines
> @@ -133,6 +133,30 @@ test_expect_success 'do partial clone 2, backfill min batch size' '
>   	test_line_count = 0 revs2
>   '
>   
> +test_expect_success TTY 'backfill shows progress on tty by default' '
> +	git clone --no-checkout --filter=blob:none \ 
> +		--single-branch --branch=main \
[1]
Show 8 quoted lines
> +		"file://$(pwd)/srv.bare" clone-tty &&
> +	test_terminal env GIT_PROGRESS_DELAY=0 git -C clone-tty backfill 2>err &&
> +	test_grep "Downloading missing blobs" err
> +'
> +
> +test_expect_success 'backfill --progress shows progress' '
> +	git clone --no-checkout --filter=blob:none \
> +		--single-branch --branch=main \
[1]
Show 8 quoted lines
> +		"file://$(pwd)/srv.bare" clone-progress &&
> +	git -C clone-progress backfill --progress 2>err &&
> +	test_grep "Downloading missing blobs" err
> +'
> +
> +test_expect_success 'backfill --no-progress suppresses progress' '
> +	git clone --no-checkout --filter=blob:none \
> +		--single-branch --branch=main \
[1]
> +		"file://$(pwd)/srv.bare" clone-no-progress &&
> +	git -C clone-no-progress backfill --no-progress 2>err &&
> +	test_grep ! "Downloading missing blobs" err
[2]
Show 5 quoted lines
> +'
> +
>   test_expect_success 'backfill --sparse without sparse-checkout fails' '
>   	git init not-sparse &&
>   	test_must_fail git -C not-sparse backfill --sparse 2>err &&

[1] I reckon you can reuse the git-cloned repository; there’s no need to clone in every test. It's up to you ;-)

[2] You mentioned that you want test script to verify that '--no-progress suppresses output', but are you referring to the output brought by the '--progress' parameter itself, or *all* output?

I believe the second scenario is a bit more meaningful. If that is the case, then the matching condition 'Downloading missing blobs' is clearly a necessary but insufficient condition. The output from the internal call to 'git fetch' within 'git backfill' will not be matched, which results in a false negative.

Regards, Yuchen
Previous: Trieu HuynhNext: Derrick Stolee
Message 4 of 5 in “backfill: add --[no-]progress option”
  1. backfill: add --[no-]progress optionTrieu Huynh, Apr 12, 2026
  2. Derrick StoleeApr 12, 2026
  3. Trieu HuynhApr 13, 2026
  4. Tian YuchenApr 15, 2026
  5. Derrick StoleeApr 15, 2026

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.