Skip to content

Commit

Permalink
add throughput display to index-pack
Browse files Browse the repository at this point in the history
... 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>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Oct 30, 2007
1 parent cf84d51 commit 29e63ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ static void *fill(int min)
die("early EOF");
die("read error on input: %s", strerror(errno));
}
if (from_stdin)
display_throughput(progress, ret);
input_len += ret;
} while (input_len < min);
return input_buffer;
Expand Down Expand Up @@ -406,7 +408,9 @@ static void parse_pack_objects(unsigned char *sha1)
* - remember base (SHA1 or offset) for all deltas.
*/
if (verbose)
progress = start_progress("Indexing objects", nr_objects);
progress = start_progress(
from_stdin ? "Receiving objects" : "Indexing objects",
nr_objects);
for (i = 0; i < nr_objects; i++) {
struct object_entry *obj = &objects[i];
data = unpack_raw_entry(obj, &delta->base);
Expand Down

0 comments on commit 29e63ed

Please sign in to comment.