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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]