Skip to content

Commit

Permalink
make sure throughput display gets updated even if progress doesn't move
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Nov 1, 2007
1 parent 93ff3f6 commit 3e935d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 3e935d1

Please sign in to comment.