diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-05 12:52:45 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-05 12:52:45 -0800 |
commit | cf91c316881188e3c8b4075ebb3ad10dda7345fb (patch) | |
tree | 9fce9f7b4fd2924f891e5f6f73a075b518b65560 | |
parent | Merge branch 'pb/submodule-update-fetches' (diff) | |
parent | builtin/unpack-objects.c: show throughput progress (diff) | |
download | tgif-cf91c316881188e3c8b4075ebb3ad10dda7345fb.tar.xz |
Merge branch 'sg/unpack-progress-throughput'
"git unpack-objects" used to show progress based only on the number
of received and unpacked objects, which stalled when it has to
handle an unusually large object. It now shows the throughput as
well.
* sg/unpack-progress-throughput:
builtin/unpack-objects.c: show throughput progress
-rw-r--r-- | builtin/unpack-objects.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index a87a4bfd2c..9100964667 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -24,6 +24,7 @@ static off_t consumed_bytes; static off_t max_input_size; static git_hash_ctx ctx; static struct fsck_options fsck_options = FSCK_OPTIONS_STRICT; +static struct progress *progress; /* * When running under --strict mode, objects whose reachability are @@ -92,6 +93,7 @@ static void use(int bytes) consumed_bytes += bytes; if (max_input_size && consumed_bytes > max_input_size) die(_("pack exceeds maximum allowed size")); + display_throughput(progress, consumed_bytes); } static void *get_data(unsigned long size) @@ -484,7 +486,6 @@ static void unpack_one(unsigned nr) static void unpack_all(void) { int i; - struct progress *progress = NULL; struct pack_header *hdr = fill(sizeof(struct pack_header)); nr_objects = ntohl(hdr->hdr_entries); |