Git development
 help / color / mirror / Atom feed
From: Tian Yuchen <cat@malon.dev>
To: Trieu Huynh <vikingtc4@gmail.com>, stolee@gmail.com, gitster@pobox.com
Cc: git@vger.kernel.org
Subject: Re: [GSoC PATCH v2] backfill: add --[no-]progress option
Date: Thu, 16 Apr 2026 01:04:58 +0800	[thread overview]
Message-ID: <21c10a52-82f4-4aa0-9027-21bb660b54cc@malon.dev> (raw)
In-Reply-To: <20260412193659.26288-1-viking4@gmail.com>

On 4/13/26 03:36, Trieu Huynh wrote:
> @@ -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]

> +		"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]

> +		"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]

> +'
> +
>   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



      parent reply	other threads:[~2026-04-15 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-12 19:36 [GSoC PATCH v2] backfill: add --[no-]progress option Trieu Huynh
2026-04-12 19:46 ` Derrick Stolee
2026-04-13 19:02   ` Trieu Huynh
2026-04-15 18:28     ` Derrick Stolee
2026-04-15 17:04 ` Tian Yuchen [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21c10a52-82f4-4aa0-9027-21bb660b54cc@malon.dev \
    --to=cat@malon.dev \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=stolee@gmail.com \
    --cc=vikingtc4@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox