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

[PATCH 3/3] delay progress display when checking out files

From
Nicolas Pitre <nico@cam.org>
Date
Apr 20, 2007, 19:27 UTC
Message-ID
<S1030980AbXDTTaV/20070420193021Z+120@vger.kernel.org>

Let's start displaying progress only if more than 50% of total number of files remains to be checked out after 2 seconds.

Signed-off-by: Nicolas Pitre <nico@cam.org>
---
 unpack-trees.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index cefc404..675a999 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -304,13 +304,8 @@ static void check_updates(struct cache_entry **src, int nr,
 				total++;
 		}
 
-		/* Don't bother doing this for very small updates */
-		if (total < 250)
-			total = 0;
-
-		if (total)
-			start_progress(&progress, "Checking %u files out...",
-				       "", total);
+		start_progress_delay(&progress, "Checking %u files out...",
+				     "", total, 50, 2);
 		cnt = 0;
 	}
 
-- 
1.5.1.1.874.g4f52f-dirty
Message 1 of 1 in “delay progress display when checking out files”
  1. 3/3 delay progress display when checking out filesNicolas Pitre, Apr 20, 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.