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

[PATCH 1/3] return the prune-packed progress display to the inner loop

From
Nicolas Pitre <nico@cam.org>
Date
Nov 1, 2007, 20:59 UTC
Message-ID
<1193950797-29631-2-git-send-email-nico@cam.org>
In-Reply-To
<1193950797-29631-1-git-send-email-nico@cam.org>

This reverts commit 0e549137966feb016927a827fb6e359aec8264a3 so to return to the same state as commit b5d72f0a4cd3cce945ca0d37e4fa0ebbfcdcdb52.

On Wed, 31 Oct 2007, Shawn O. Pearce wrote:
Show 5 quoted lines
> During my testing with a 40,000 loose object case (yea, I fully
> unpacked a git.git clone I had laying around) my system stalled
> hard in the first object directory.  A *lot* longer than 1 second.
> So I got no progress meter for a long time, and then a progress
> meter appeared on the second directory.
Signed-off-by: Nicolas Pitre <nico@cam.org>
---
 builtin-prune-packed.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c
index f4287da..23faf31 100644
--- a/builtin-prune-packed.c
+++ b/builtin-prune-packed.c
@@ -15,8 +15,6 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts)
 	struct dirent *de;
 	char hex[40];
 
-	display_progress(progress, i + 1);
-
 	sprintf(hex, "%02x", i);
 	while ((de = readdir(dir)) != NULL) {
 		unsigned char sha1[20];
@@ -32,6 +30,7 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts)
 			printf("rm -f %s\n", pathname);
 		else if (unlink(pathname) < 0)
 			error("unable to unlink %s", pathname);
+		display_progress(progress, i + 1);
 	}
 	pathname[len] = 0;
 	rmdir(pathname);
-- 
1.5.3.4.279.gb2d9d-dirty
Previous: Nicolas PitreNext: Nicolas Pitre
Message 2 of 5 in “yet more progress display stuff”
  1. 0/3 yet more progress display stuffNicolas Pitre, Nov 1, 2007
  2. 1/3 return the prune-packed progress display to the inner loopNicolas Pitre, Nov 1, 2007
  3. 2/3 make sure throughput display gets updated even if progress doesn't moveNicolas Pitre, Nov 1, 2007
  4. 3/3 Show total transferred as part of throughput progressNicolas Pitre, Nov 1, 2007
  5. Shawn O. PearceNov 2, 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.