summaryrefslogtreecommitdiff
path: root/builtin-unpack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-10-30 18:57:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-10-30 23:08:40 (GMT)
commitdc6a0757c4f966dd124bd85be2adad5a0b7b2167 (patch)
treee6b910be55af5d634bb7cc187985ddf57c70a01b /builtin-unpack-objects.c
parent0e549137966feb016927a827fb6e359aec8264a3 (diff)
downloadgit-dc6a0757c4f966dd124bd85be2adad5a0b7b2167.zip
git-dc6a0757c4f966dd124bd85be2adad5a0b7b2167.tar.gz
git-dc6a0757c4f966dd124bd85be2adad5a0b7b2167.tar.bz2
make struct progress an opaque type
This allows for better management of progress "object" existence, as well as making the progress display implementation more independent from its callers. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-unpack-objects.c')
-rw-r--r--builtin-unpack-objects.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-unpack-objects.c b/builtin-unpack-objects.c
index 2317b8f..e0ecbc5 100644
--- a/builtin-unpack-objects.c
+++ b/builtin-unpack-objects.c
@@ -311,7 +311,7 @@ static void unpack_one(unsigned nr)
static void unpack_all(void)
{
int i;
- struct progress progress;
+ struct progress *progress = NULL;
struct pack_header *hdr = fill(sizeof(struct pack_header));
unsigned nr_objects = ntohl(hdr->hdr_entries);
@@ -322,12 +322,12 @@ static void unpack_all(void)
use(sizeof(struct pack_header));
if (!quiet)
- start_progress(&progress, "Unpacking objects", nr_objects);
+ progress = start_progress("Unpacking objects", nr_objects);
obj_list = xmalloc(nr_objects * sizeof(*obj_list));
for (i = 0; i < nr_objects; i++) {
unpack_one(i);
if (!quiet)
- display_progress(&progress, i + 1);
+ display_progress(progress, i + 1);
}
if (!quiet)
stop_progress(&progress);