path: root/csum-file.h
diff options
authorNicolas Pitre <>2007-11-05 03:15:41 (GMT)
committerJunio C Hamano <>2007-11-05 20:53:14 (GMT)
commit218558af599c01e5dec17a7399d9188a76c50203 (patch)
tree4cbbbc442f76653aec103c4e7c1d62763fe5e5e2 /csum-file.h
parent0d8aafd25271c8d1cf185019437e21362edc1bc7 (diff)
make display of total transferred more accurate
The throughput display needs a delay period before accounting and displaying anything. Yet it might be called after some amount of data has already been transferred. The display of total data is therefore accounted late and therefore smaller than the reality. Let's call display_throughput() with an absolute amount of transferred data instead of a relative number, and let the throughput code find the relative amount of data by itself as needed. This way the displayed total is always exact. Signed-off-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'csum-file.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/csum-file.h b/csum-file.h
index 4d1b231..a38cc3a 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -8,6 +8,7 @@ struct sha1file {
int fd, error;
unsigned int offset, namelen;
SHA_CTX ctx;
+ off_t total;
struct progress *tp;
char name[PATH_MAX];
int do_crc;