Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-10-25 01:07:07 +0400
committerBen Straub <bs@github.com>2012-10-25 01:07:07 +0400
commit1e3b8ed5cfe784f73a123c33c90f573742d8839e (patch)
tree52514d7be3372af3588a5d9f394710782ad687ab /src/fetch.c
parent9762ad993dc1afff90a3d14751f1b1f666ad0c95 (diff)
Remove 'bytes' param from git_remote_download
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/fetch.c b/src/fetch.c
index ee85f083d..0aabe744f 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -306,7 +306,6 @@ on_error:
int git_fetch_download_pack(
git_remote *remote,
- git_off_t *bytes,
git_transfer_progress_callback progress_cb,
void *progress_payload)
{
@@ -316,14 +315,14 @@ int git_fetch_download_pack(
return 0;
if (t->own_logic)
- return t->download_pack(t, remote->repo, bytes, &remote->stats);
+ return t->download_pack(t, remote->repo, &remote->stats);
- return git_fetch__download_pack(t, remote->repo, bytes, &remote->stats,
+ return git_fetch__download_pack(t, remote->repo, &remote->stats,
progress_cb, progress_payload);
}
-static int no_sideband(git_transport *t, git_indexer_stream *idx, gitno_buffer *buf, git_off_t *bytes, git_transfer_progress *stats)
+static int no_sideband(git_transport *t, git_indexer_stream *idx, gitno_buffer *buf, git_transfer_progress *stats)
{
int recvd;
@@ -340,8 +339,6 @@ static int no_sideband(git_transport *t, git_indexer_stream *idx, gitno_buffer *
if ((recvd = gitno_recv(buf)) < 0)
return -1;
-
- *bytes += recvd;
} while(recvd > 0);
if (git_indexer_stream_finalize(idx, stats))
@@ -376,7 +373,6 @@ static void network_packetsize(int received, void *payload)
int git_fetch__download_pack(
git_transport *t,
git_repository *repo,
- git_off_t *bytes,
git_transfer_progress *stats,
git_transfer_progress_callback progress_cb,
void *progress_payload)
@@ -403,7 +399,6 @@ int git_fetch__download_pack(
git_buf_free(&path);
memset(stats, 0, sizeof(git_transfer_progress));
- *bytes = 0;
/*
* If the remote doesn't support the side-band, we can feed
@@ -411,7 +406,7 @@ int git_fetch__download_pack(
* check which one belongs there.
*/
if (!t->caps.side_band && !t->caps.side_band_64k) {
- if (no_sideband(t, idx, buf, bytes, stats) < 0)
+ if (no_sideband(t, idx, buf, stats) < 0)
goto on_error;
git_indexer_stream_free(idx);
@@ -438,7 +433,6 @@ int git_fetch__download_pack(
git__free(pkt);
} else if (pkt->type == GIT_PKT_DATA) {
git_pkt_data *p = (git_pkt_data *) pkt;
- *bytes += p->len;
if (git_indexer_stream_add(idx, p->data, p->len, stats) < 0)
goto on_error;