Skip to content

Commit 29e63ed

Browse files
Nicolas Pitregitster
authored andcommitted
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>
1 parent cf84d51 commit 29e63ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index-pack.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ static void *fill(int min)
8787
die("early EOF");
8888
die("read error on input: %s", strerror(errno));
8989
}
90+
if (from_stdin)
91+
display_throughput(progress, ret);
9092
input_len += ret;
9193
} while (input_len < min);
9294
return input_buffer;
@@ -406,7 +408,9 @@ static void parse_pack_objects(unsigned char *sha1)
406408
* - remember base (SHA1 or offset) for all deltas.
407409
*/
408410
if (verbose)
409-
progress = start_progress("Indexing objects", nr_objects);
411+
progress = start_progress(
412+
from_stdin ? "Receiving objects" : "Indexing objects",
413+
nr_objects);
410414
for (i = 0; i < nr_objects; i++) {
411415
struct object_entry *obj = &objects[i];
412416
data = unpack_raw_entry(obj, &delta->base);

0 commit comments

Comments
 (0)