add throughput display to index-pack
... and call it "Receiving objects" when over stdin to look clearer to end users. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre committed
Oct 30, 2007 at 14:57 UTC
29e63ed3f6962cd96f7153e9f492f36797d25c33
1 file changed
+5
-1
index-pack.c
+5
-1
@@ -87,6 +87,8 @@ static void *fill(int min)
87
die("early EOF");
88
die("read error on input: %s", strerror(errno));
89
}
90
+ if (from_stdin)
91
+ display_throughput(progress, ret);
92
input_len += ret;
93
} while (input_len < min);
94
return input_buffer;
@@ -406,7 +408,9 @@ static void parse_pack_objects(unsigned char *sha1)
408
* - remember base (SHA1 or offset) for all deltas.
409
*/
410
if (verbose)
409
- progress = start_progress("Indexing objects", nr_objects);
411
+ progress = start_progress(
412
+ from_stdin ? "Receiving objects" : "Indexing objects",
413
+ nr_objects);
414
for (i = 0; i < nr_objects; i++) {
415
struct object_entry *obj = &objects[i];
416
data = unpack_raw_entry(obj, &delta->base);