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

Re: [PATCH] common progress display support

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 19, 2007, 09:03 UTC
Message-ID
<Pine.LNX.4.64.0704191053590.8822@racer.site>
In-Reply-To
<alpine.LFD.0.98.0704181422050.4504@xanadu.home>
Hi,
On Wed, 18 Apr 2007, Nicolas Pitre wrote:
> Instead of having this code duplicated in multiple places, let's have a 
> common interface for progress display.
I like that!
Show 13 quoted lines
> diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
> index 19fae4c..150f56c 100644
> --- a/builtin-pack-objects.c
> +++ b/builtin-pack-objects.c
> @@ -588,8 +588,10 @@ static off_t write_pack_file(void)
>  		f = sha1fd(fd, pack_tmp_name);
>  	}
>  
> -	if (do_progress)
> +	if (do_progress) {
>  		fprintf(stderr, "Writing %u objects.\n", nr_result);
> +		start_progress(&progress_state, "", nr_result);
> +	}

It seems like it would be a good idea to change the signature of start_progress() to take an optional message, like this:

	start_progress(&progress_state, "Writing %u object.s\n", 
		"", nr_result);
It would make the added/deleted ratio even more impressive.

I only skimmed the patch, but like all of your patches, it looks good to me.

Ciao, Dscho

Previous: Nicolas Pitre
Message 4 of 4 in “common progress display support”
  1. common progress display supportNicolas Pitre, Apr 18, 2007
  2. Shawn O. PearceApr 18, 2007
  3. Nicolas PitreApr 18, 2007
  4. Johannes SchindelinApr 19, 2007

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.