Skip to content

Commit

Permalink
delay progress display when checking out files
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Apr 23, 2007
1 parent 180a9f2 commit 55a9137
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions unpack-trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 55a9137

Please sign in to comment.