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

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

From
Trieu Huynh <vikingtc4@gmail.com>
Date
Apr 7, 2026, 19:22 UTC
Message-ID
<ktjgf2gyf5wkktiquy4cfzdcifd2yhqk3mngckaih4bwca6fda@nkcju65ku7hf>
In-Reply-To
<xmqqh5poat4x.fsf@gitster.g>
On Mon, Apr 06, 2026 at 10:35:58AM -0700, Junio C Hamano wrote:
Show 32 quoted lines
> Derrick Stolee <stolee@gmail.com> writes:
> 
> > On 3/29/2026 11:24 AM, Trieu Huynh wrote:
> >> 'git backfill' is silent when downloading missing objects, giving
> >> no feedback during potentially long-running operations on large
> >> repositories. By contrast, 'git fetch', 'git gc', and
> >> 'git index-pack' all support --[no-]progress.
> >
> > I wouldn't use the word "silent" because the output is actually
> > quite verbose by default.
> 
> ;-)
> 
> > With your patch, I think there would be some extra progress
> > indicators between these batched fetch requests.
> 
> >>  static void backfill_context_clear(struct backfill_context *ctx)
> >> @@ -54,6 +57,7 @@ static void download_batch(struct backfill_context *ctx)
> >>  	 * avoid possible duplicate downloads of the same objects.
> >>  	 */
> >>  	odb_reprepare(ctx->repo->objects);
> >> +	display_progress(ctx->progress, ++ctx->batches_requested);
> >
> > This looks correct. My preference is to not use prefix operators
> > like this on struct members (it reads like you are incrementing
> > 'ctx' and not 'batches_requested', even though it is correct).
> 
> Thanks for paying extra attention to such details.  In general,
> post-increment and pre-decrement are the norm when evaluated in a
> void context, so the use of pre-increment above violates that norm
> too.
> 

Thanks for pointing it out. Will update, eg: ++counter; foo(counter);

Show 5 quoted lines
> > However, I'm not sure that we want the progress to indicate the
> > number of _batches_ but instead should be the number of _objects_.
> 
> True, too.
> 

Make sense to me, worth checking if we can feasibly track the total object count instead of just batches to make the progress more meaningful.

> Thanks.

Thank you for all your kind review. I'll update v2 as per your comments. Hopefully, it can address these concerns.

BRs, Trieu Huynh

Previous: Trieu HuynhNext: Junio C Hamano
Message 5 of 6 in “backfill: add --[no-]progress option”
  1. backfill: add --[no-]progress optionTrieu Huynh, Mar 29, 2026
  2. Derrick StoleeApr 6, 2026
  3. Junio C HamanoApr 6, 2026
  4. Trieu HuynhApr 7, 2026
  5. Trieu HuynhApr 7, 2026
  6. Junio C HamanoApr 7, 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.