{"thread":{"id":"7760","subject":"[PATCH 3/3] delay progress display when checking out files","startedAt":"2007-04-20T19:27:44Z","lastAt":"2007-04-20T19:27:44Z","messageCount":1,"participants":["Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"40004","messageId":"S1030980AbXDTTaV/20070420193021Z+120@vger.kernel.org","threadId":"7760","inReplyTo":null,"subject":"[PATCH 3/3] delay progress display when checking out files","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-04-20T19:27:44Z","receivedAt":"2007-04-20T19:27:44Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"Let's start displaying progress only if more than 50% of total number\nof files remains to be checked out after 2 seconds.\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n---\n unpack-trees.c |    9 ++-------\n 1 files changed, 2 insertions(+), 7 deletions(-)\n\ndiff --git a/unpack-trees.c b/unpack-trees.c\nindex cefc404..675a999 100644\n--- a/unpack-trees.c\n+++ b/unpack-trees.c\n@@ -304,13 +304,8 @@ static void check_updates(struct cache_entry **src, int nr,\n \t\t\t\ttotal++;\n \t\t}\n \n-\t\t/* Don't bother doing this for very small updates */\n-\t\tif (total < 250)\n-\t\t\ttotal = 0;\n-\n-\t\tif (total)\n-\t\t\tstart_progress(&progress, \"Checking %u files out...\",\n-\t\t\t\t       \"\", total);\n+\t\tstart_progress_delay(&progress, \"Checking %u files out...\",\n+\t\t\t\t     \"\", total, 50, 2);\n \t\tcnt = 0;\n \t}\n \n-- \n1.5.1.1.874.g4f52f-dirty\n"}]}