Show total transferred as part of throughput progress

Right now it is infeasible to offer to the user a reasonable concept
of when a clone will be complete as we aren't able to come up with
the final pack size until after we have actually transferred the
entire thing to the client.  However in many cases users can work
with a rough rule-of-thumb; for example it is somewhat well known
that git.git is about 16 MiB today and that linux-2.6.git is over
120 MiB.

We now show the total amount of data we have transferred over
the network as part of the throughput meter, organizing it in
"human friendly" terms like `ls -h` would do.  Users can glance at
this, see that the total transferred size is about 3 MiB, see the
throughput of X KiB/sec, and determine a reasonable figure of about
when the clone will be complete, assuming they know the rough size
of the source repository or are able to obtain it.

This is also a helpful indicator that there is progress being made
even if we stall on a very large object.  The thoughput meter may
remain relatively constant and the percentage complete and object
count won't be changing, but the total transferred will be increasing
as additional data is received for this object.

[from an initial proposal from Shawn O. Pearce]

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 file changed
tree: e63903ba690304dfca70966e1530a8a125ed0896
  1. arm/
  2. compat/
  3. contrib/
  4. Documentation/
  5. git-gui/
  6. gitweb/
  7. mozilla-sha1/
  8. perl/
  9. ppc/
  10. t/
  11. templates/
  12. xdiff/
  13. .gitignore
  14. .mailmap
  15. alloc.c
  16. archive-tar.c
  17. archive-zip.c
  18. archive.h
  19. attr.c
  20. attr.h
  21. base85.c
  22. blob.c
  23. blob.h
  24. builtin-add.c
  25. builtin-annotate.c
  26. builtin-apply.c
  27. builtin-archive.c
  28. builtin-blame.c
  29. builtin-branch.c
  30. builtin-bundle.c
  31. builtin-cat-file.c
  32. builtin-check-attr.c
  33. builtin-check-ref-format.c
  34. builtin-checkout-index.c
  35. builtin-commit-tree.c
  36. builtin-config.c
  37. builtin-count-objects.c
  38. builtin-describe.c
  39. builtin-diff-files.c
  40. builtin-diff-index.c
  41. builtin-diff-tree.c
  42. builtin-diff.c
  43. builtin-fetch--tool.c
  44. builtin-fmt-merge-msg.c
  45. builtin-for-each-ref.c
  46. builtin-fsck.c
  47. builtin-gc.c
  48. builtin-grep.c
  49. builtin-init-db.c
  50. builtin-log.c
  51. builtin-ls-files.c
  52. builtin-ls-tree.c
  53. builtin-mailinfo.c
  54. builtin-mailsplit.c
  55. builtin-merge-base.c
  56. builtin-merge-file.c
  57. builtin-mv.c
  58. builtin-name-rev.c
  59. builtin-pack-objects.c
  60. builtin-pack-refs.c
  61. builtin-prune-packed.c
  62. builtin-prune.c
  63. builtin-push.c
  64. builtin-read-tree.c
  65. builtin-reflog.c
  66. builtin-rerere.c
  67. builtin-reset.c
  68. builtin-rev-list.c
  69. builtin-rev-parse.c
  70. builtin-revert.c
  71. builtin-rm.c
  72. builtin-runstatus.c
  73. builtin-shortlog.c
  74. builtin-show-branch.c
  75. builtin-show-ref.c
  76. builtin-stripspace.c
  77. builtin-symbolic-ref.c
  78. builtin-tag.c
  79. builtin-tar-tree.c
  80. builtin-unpack-objects.c
  81. builtin-update-index.c
  82. builtin-update-ref.c
  83. builtin-upload-archive.c
  84. builtin-verify-pack.c
  85. builtin-verify-tag.c
  86. builtin-write-tree.c
  87. builtin.h
  88. cache-tree.c
  89. cache-tree.h
  90. cache.h
  91. check-builtins.sh
  92. check-racy.c
  93. color.c
  94. color.h
  95. combine-diff.c
  96. commit.c
  97. commit.h
  98. config.c
  99. config.mak.in
  100. configure.ac
  101. connect.c
  102. convert.c
  103. copy.c
  104. COPYING
  105. csum-file.c
  106. csum-file.h
  107. ctype.c
  108. daemon.c
  109. date.c
  110. decorate.c
  111. decorate.h
  112. delta.h
  113. diff-delta.c
  114. diff-lib.c
  115. diff.c
  116. diff.h
  117. diffcore-break.c
  118. diffcore-delta.c
  119. diffcore-order.c
  120. diffcore-pickaxe.c
  121. diffcore-rename.c
  122. diffcore.h
  123. dir.c
  124. dir.h
  125. dump-cache-tree.c
  126. entry.c
  127. environment.c
  128. exec_cmd.c
  129. exec_cmd.h
  130. fast-import.c
  131. fetch-pack.c
  132. fetch.c
  133. fetch.h
  134. fixup-builtins
  135. generate-cmdlist.sh
  136. git-add--interactive.perl
  137. git-am.sh
  138. git-archimport.perl
  139. git-bisect.sh
  140. git-checkout.sh
  141. git-clean.sh
  142. git-clone.sh
  143. git-commit.sh
  144. git-compat-util.h
  145. git-cvsexportcommit.perl
  146. git-cvsimport.perl
  147. git-cvsserver.perl
  148. git-fetch.sh
  149. git-filter-branch.sh
  150. git-instaweb.sh
  151. git-lost-found.sh
  152. git-ls-remote.sh
  153. git-merge-octopus.sh
  154. git-merge-one-file.sh
  155. git-merge-ours.sh
  156. git-merge-resolve.sh
  157. git-merge-stupid.sh
  158. git-merge.sh
  159. git-mergetool.sh
  160. git-parse-remote.sh
  161. git-pull.sh
  162. git-quiltimport.sh
  163. git-rebase--interactive.sh
  164. git-rebase.sh
  165. git-relink.perl
  166. git-remote.perl
  167. git-repack.sh
  168. git-request-pull.sh
  169. git-send-email.perl
  170. git-sh-setup.sh
  171. git-stash.sh
  172. git-submodule.sh
  173. git-svn.perl
  174. git-svnimport.perl
  175. GIT-VERSION-GEN
  176. git.c
  177. git.spec.in
  178. gitk
  179. grep.c
  180. grep.h
  181. hash-object.c
  182. help.c
  183. http-fetch.c
  184. http-push.c
  185. http.c
  186. http.h
  187. ident.c
  188. imap-send.c
  189. index-pack.c
  190. INSTALL
  191. interpolate.c
  192. interpolate.h
  193. list-objects.c
  194. list-objects.h
  195. local-fetch.c
  196. lockfile.c
  197. log-tree.c
  198. log-tree.h
  199. mailmap.c
  200. mailmap.h
  201. Makefile
  202. match-trees.c
  203. merge-file.c
  204. merge-index.c
  205. merge-recursive.c
  206. merge-tree.c
  207. mktag.c
  208. mktree.c
  209. object-refs.c
  210. object.c
  211. object.h
  212. pack-check.c
  213. pack-redundant.c
  214. pack-write.c
  215. pack.h
  216. pager.c
  217. patch-delta.c
  218. patch-id.c
  219. patch-ids.c
  220. patch-ids.h
  221. path-list.c
  222. path-list.h
  223. path.c
  224. peek-remote.c
  225. pkt-line.c
  226. pkt-line.h
  227. progress.c
  228. progress.h
  229. quote.c
  230. quote.h
  231. reachable.c
  232. reachable.h
  233. read-cache.c
  234. README
  235. receive-pack.c
  236. reflog-walk.c
  237. reflog-walk.h
  238. refs.c
  239. refs.h
  240. remote.c
  241. remote.h
  242. revision.c
  243. revision.h
  244. rsh.c
  245. rsh.h
  246. run-command.c
  247. run-command.h
  248. send-pack.c
  249. server-info.c
  250. setup.c
  251. sha1_file.c
  252. sha1_name.c
  253. shallow.c
  254. shell.c
  255. show-index.c
  256. sideband.c
  257. sideband.h
  258. ssh-fetch.c
  259. ssh-pull.c
  260. ssh-push.c
  261. ssh-upload.c
  262. strbuf.c
  263. strbuf.h
  264. symlinks.c
  265. tag.c
  266. tag.h
  267. tar.h
  268. test-absolute-path.c
  269. test-chmtime.c
  270. test-date.c
  271. test-delta.c
  272. test-genrandom.c
  273. test-match-trees.c
  274. test-sha1.c
  275. test-sha1.sh
  276. trace.c
  277. tree-diff.c
  278. tree-walk.c
  279. tree-walk.h
  280. tree.c
  281. tree.h
  282. unpack-file.c
  283. unpack-trees.c
  284. unpack-trees.h
  285. update-server-info.c
  286. upload-pack.c
  287. usage.c
  288. utf8.c
  289. utf8.h
  290. var.c
  291. write_or_die.c
  292. wt-status.c
  293. wt-status.h
  294. xdiff-interface.c
  295. xdiff-interface.h