summaryrefslogtreecommitdiff
path: root/progress.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-11-01 16:59:56 -0400
committerJunio C Hamano <gitster@pobox.com>2007-11-01 15:22:32 -0700
commit3e935d19822db08cc0dedd8764135771ffd6ec7b (patch)
treed52e65845b015e41bbecf045fd234e098bd79857 /progress.c
parent93ff3f6a5311ebb6347b817d1c57c94dbbe4de73 (diff)
downloadgit-3e935d19822db08cc0dedd8764135771ffd6ec7b.tar.gz
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>
Diffstat (limited to 'progress.c')
-rw-r--r--progress.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/progress.c b/progress.c
index 34a59611fb..39d5d2c9f2 100644
--- a/progress.c
+++ b/progress.c
@@ -160,6 +160,9 @@ void display_throughput(struct progress *progress, unsigned long n)
tp->last_misecs[tp->idx] = misecs;
tp->idx = (tp->idx + 1) % TP_IDX_MAX;
tp->count = 0;
+
+ if (progress->last_value != -1 && progress_update)
+ display(progress, progress->last_value, 0);
}
}