diff options
author | Ben Straub <bs@github.com> | 2012-10-16 13:10:27 -0700 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-10-19 19:34:14 -0700 |
commit | 3028be0723f42f31b1973da9f19f2b0468b11754 (patch) | |
tree | 077894f4f24a735cda1361680f14affa35efc37d /src | |
parent | 92f91b0e3bc3b7799b2b18ea07b167ad191a47a9 (diff) | |
download | libgit2-3028be0723f42f31b1973da9f19f2b0468b11754.tar.gz |
Add git_indexer_stats field to git_remote
Also removing all the *stats parameters from external
APIs that don't need them anymore.
Diffstat (limited to 'src')
-rw-r--r-- | src/clone.c | 2 | ||||
-rw-r--r-- | src/fetch.c | 6 | ||||
-rw-r--r-- | src/fetch.h | 2 | ||||
-rw-r--r-- | src/remote.c | 6 | ||||
-rw-r--r-- | src/remote.h | 1 |
5 files changed, 9 insertions, 8 deletions
diff --git a/src/clone.c b/src/clone.c index 85e69ad97..215185610 100644 --- a/src/clone.c +++ b/src/clone.c @@ -263,7 +263,7 @@ static int setup_remotes_and_fetch(git_repository *repo, if (!git_remote_add(&origin, repo, GIT_REMOTE_ORIGIN, origin_url)) { /* Connect and download everything */ if (!git_remote_connect(origin, GIT_DIR_FETCH)) { - if (!git_remote_download(origin, &bytes, fetch_stats)) { + if (!git_remote_download(origin, &bytes)) { /* Create "origin/foo" branches for all remote branches */ if (!git_remote_update_tips(origin)) { /* Point HEAD to the same ref as the remote's head */ diff --git a/src/fetch.c b/src/fetch.c index dc01f6791..242946356 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -302,7 +302,7 @@ on_error: return error; } -int git_fetch_download_pack(git_remote *remote, git_off_t *bytes, git_indexer_stats *stats) +int git_fetch_download_pack(git_remote *remote, git_off_t *bytes) { git_transport *t = remote->transport; @@ -310,9 +310,9 @@ int git_fetch_download_pack(git_remote *remote, git_off_t *bytes, git_indexer_st return 0; if (t->own_logic) - return t->download_pack(t, remote->repo, bytes, stats); + return t->download_pack(t, remote->repo, bytes, &remote->stats); - return git_fetch__download_pack(t, remote->repo, bytes, stats); + return git_fetch__download_pack(t, remote->repo, bytes, &remote->stats); } diff --git a/src/fetch.h b/src/fetch.h index 87bb43b07..ae030c6eb 100644 --- a/src/fetch.h +++ b/src/fetch.h @@ -10,7 +10,7 @@ #include "netops.h" int git_fetch_negotiate(git_remote *remote); -int git_fetch_download_pack(git_remote *remote, git_off_t *bytes, git_indexer_stats *stats); +int git_fetch_download_pack(git_remote *remote, git_off_t *bytes); int git_fetch__download_pack(git_transport *t, git_repository *repo, git_off_t *bytes, git_indexer_stats *stats); int git_fetch_setup_walk(git_revwalk **out, git_repository *repo); diff --git a/src/remote.c b/src/remote.c index c47f2d1ec..82ab22f4a 100644 --- a/src/remote.c +++ b/src/remote.c @@ -433,16 +433,16 @@ int git_remote_ls(git_remote *remote, git_headlist_cb list_cb, void *payload) return 0; } -int git_remote_download(git_remote *remote, git_off_t *bytes, git_indexer_stats *stats) +int git_remote_download(git_remote *remote, git_off_t *bytes) { int error; - assert(remote && bytes && stats); + assert(remote && bytes); if ((error = git_fetch_negotiate(remote)) < 0) return error; - return git_fetch_download_pack(remote, bytes, stats); + return git_fetch_download_pack(remote, bytes); } int git_remote_update_tips(git_remote *remote) diff --git a/src/remote.h b/src/remote.h index 05073db8c..1ba82608b 100644 --- a/src/remote.h +++ b/src/remote.h @@ -25,6 +25,7 @@ struct git_remote { git_transport *transport; git_repository *repo; git_remote_callbacks callbacks; + git_indexer_stats stats; unsigned int need_pack:1, download_tags:2, /* There are four possible values */ check_cert:1; |