diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2019-02-21 10:33:30 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-02-22 11:25:14 +0000 |
| commit | a1ef995dc03379fb1f5151b5d98d16644218c95e (patch) | |
| tree | f209958f5f27dfbe3dc2da296c801563a348cce4 /examples | |
| parent | 975d6722a5c203427ab63789d329c00b76461225 (diff) | |
| download | libgit2-a1ef995dc03379fb1f5151b5d98d16644218c95e.tar.gz | |
indexer: use git_indexer_progress throughout
Update internal usage of `git_transfer_progress` to
`git_indexer_progreses`.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/clone.c | 4 | ||||
| -rw-r--r-- | examples/fetch.c | 4 | ||||
| -rw-r--r-- | examples/index-pack.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/clone.c b/examples/clone.c index fc121bc1e..ee403e139 100644 --- a/examples/clone.c +++ b/examples/clone.c @@ -1,7 +1,7 @@ #include "common.h" typedef struct progress_data { - git_transfer_progress fetch_progress; + git_indexer_progress fetch_progress; size_t completed_steps; size_t total_steps; const char *path; @@ -46,7 +46,7 @@ static int sideband_progress(const char *str, int len, void *payload) return 0; } -static int fetch_progress(const git_transfer_progress *stats, void *payload) +static int fetch_progress(const git_indexer_progress *stats, void *payload) { progress_data *pd = (progress_data*)payload; pd->fetch_progress = *stats; diff --git a/examples/fetch.c b/examples/fetch.c index 1df373e38..7f8e2317f 100644 --- a/examples/fetch.c +++ b/examples/fetch.c @@ -38,7 +38,7 @@ static int update_cb(const char *refname, const git_oid *a, const git_oid *b, vo * data. Most frontends will probably want to show a percentage and * the download rate. */ -static int transfer_progress_cb(const git_transfer_progress *stats, void *payload) +static int transfer_progress_cb(const git_indexer_progress *stats, void *payload) { (void)payload; @@ -57,7 +57,7 @@ static int transfer_progress_cb(const git_transfer_progress *stats, void *payloa int lg2_fetch(git_repository *repo, int argc, char **argv) { git_remote *remote = NULL; - const git_transfer_progress *stats; + const git_indexer_progress *stats; git_fetch_options fetch_opts = GIT_FETCH_OPTIONS_INIT; if (argc < 2) { diff --git a/examples/index-pack.c b/examples/index-pack.c index df11177c6..641587ee3 100644 --- a/examples/index-pack.c +++ b/examples/index-pack.c @@ -20,7 +20,7 @@ * 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_transfer_progress *stats, void *data) +static int index_cb(const git_indexer_progress *stats, void *data) { (void)data; printf("\rProcessing %d of %d", stats->indexed_objects, stats->total_objects); @@ -31,7 +31,7 @@ static int index_cb(const git_transfer_progress *stats, void *data) int lg2_index_pack(git_repository *repo, int argc, char **argv) { git_indexer *idx; - git_transfer_progress stats = {0, 0}; + git_indexer_progress stats = {0, 0}; int error; char hash[GIT_OID_HEXSZ + 1] = {0}; int fd; |
