summaryrefslogtreecommitdiff
path: root/examples/network/index-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/index-pack.c')
-rw-r--r--examples/network/index-pack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/network/index-pack.c b/examples/network/index-pack.c
index 69338b37f..4d3dc84d6 100644
--- a/examples/network/index-pack.c
+++ b/examples/network/index-pack.c
@@ -10,10 +10,10 @@
// This could be run in the main loop whilst the application waits for
// the indexing to finish in a worker thread
-static int index_cb(const git_indexer_stats *stats, void *data)
+static int index_cb(const git_transfer_progress *stats, void *data)
{
data = data;
- printf("\rProcessing %d of %d", stats->processed, stats->total);
+ printf("\rProcessing %d of %d", stats->indexed_objects, stats->total_objects);
return 0;
}
@@ -21,7 +21,7 @@ static int index_cb(const git_indexer_stats *stats, void *data)
int index_pack(git_repository *repo, int argc, char **argv)
{
git_indexer_stream *idx;
- git_indexer_stats stats = {0, 0};
+ git_transfer_progress stats = {0, 0};
int error, fd;
char hash[GIT_OID_HEXSZ + 1] = {0};
ssize_t read_bytes;
@@ -63,7 +63,7 @@ int index_pack(git_repository *repo, int argc, char **argv)
if ((error = git_indexer_stream_finalize(idx, &stats)) < 0)
goto cleanup;
- printf("\rIndexing %d of %d\n", stats.processed, stats.total);
+ printf("\rIndexing %d of %d\n", stats.indexed_objects, stats.total_objects);
git_oid_fmt(hash, git_indexer_stream_hash(idx));
puts(hash);