make sure throughput display gets updated even if progress doesn't move
Currently the progress/throughput display update happens only through display_progress(). If the progress based on object count remains unchanged because a large object is being received, the latest throughput won't be displayed. The display update should occur through display_throughput() as well. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre committed
Nov 1, 2007 at 16:59 UTC
3e935d19822db08cc0dedd8764135771ffd6ec7b
1 file changed
+3
progress.c
+3
@@ -160,6 +160,9 @@ void display_throughput(struct progress *progress, unsigned long n)
160
tp->last_misecs[tp->idx] = misecs;
161
tp->idx = (tp->idx + 1) % TP_IDX_MAX;
162
tp->count = 0;
163
+
164
+ if (progress->last_value != -1 && progress_update)
165
+ display(progress, progress->last_value, 0);
166
}
167
}
168