summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-10-30 14:57:32 -0400
committerJunio C Hamano <gitster@pobox.com>2007-10-30 16:08:40 -0700
commitdc6a0757c4f966dd124bd85be2adad5a0b7b2167 (patch)
treee6b910be55af5d634bb7cc187985ddf57c70a01b /unpack-trees.c
parent0e549137966feb016927a827fb6e359aec8264a3 (diff)
downloadgit-dc6a0757c4f966dd124bd85be2adad5a0b7b2167.tar.gz
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 'unpack-trees.c')
-rw-r--r--unpack-trees.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 32251018b2..6776c29cde 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -297,7 +297,7 @@ static void check_updates(struct cache_entry **src, int nr,
{
unsigned short mask = htons(CE_UPDATE);
unsigned cnt = 0, total = 0;
- struct progress progress;
+ struct progress *progress = NULL;
char last_symlink[PATH_MAX];
if (o->update && o->verbose_update) {
@@ -307,8 +307,8 @@ static void check_updates(struct cache_entry **src, int nr,
total++;
}
- start_progress_delay(&progress, "Checking out files",
- total, 50, 2);
+ progress = start_progress_delay("Checking out files",
+ total, 50, 2);
cnt = 0;
}
@@ -318,7 +318,7 @@ static void check_updates(struct cache_entry **src, int nr,
if (total)
if (!ce->ce_mode || ce->ce_flags & mask)
- display_progress(&progress, ++cnt);
+ display_progress(progress, ++cnt);
if (!ce->ce_mode) {
if (o->update)
unlink_entry(ce->name, last_symlink);
@@ -333,7 +333,7 @@ static void check_updates(struct cache_entry **src, int nr,
}
}
if (total)
- stop_progress(&progress);;
+ stop_progress(&progress);
}
int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options *o)