Skip to content

Commit

Permalink
return the prune-packed progress display to the inner loop
Browse files Browse the repository at this point in the history
This reverts commit 0e54913 so to return
to the same state as commit b5d72f0.

On Wed, 31 Oct 2007, Shawn O. Pearce wrote:
> 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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Nov 1, 2007
1 parent 2a128d6 commit 93ff3f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions builtin-prune-packed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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);
Expand Down

0 comments on commit 93ff3f6

Please sign in to comment.