@matheusbsbs / matheus-bagliano / commits / 55a9137d8a
Fork 0

delay progress display when checking out files

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>

Nicolas Pitre committed Apr 20, 2007 at 15:27 UTC 55a9137d8a33449425c55104c00bc9189381754a
1 file changed +2 -7
unpack-trees.c
+2 -7
@@ -304,13 +304,8 @@ static void check_updates(struct cache_entry **src, int nr,
304 total++;
305 }
306
307 - /* Don't bother doing this for very small updates */
308 - if (total < 250)
309 - total = 0;
310 -
311 - if (total)
312 - start_progress(&progress, "Checking %u files out...",
313 - "", total);
307 + start_progress_delay(&progress, "Checking %u files out...",
308 + "", total, 50, 2);
309 cnt = 0;
310 }
311