diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-04-13 23:19:38 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-04-25 12:39:11 +0200 |
| commit | 7a520f5d8af2aedd5693bf7314527d76d9af2ef4 (patch) | |
| tree | bcd87f54398650e3355e0bc34d23bbad0486c358 /src/remote.c | |
| parent | f9f2344bd4ba6c81a96959509ba59f8563b60265 (diff) | |
| download | libgit2-7a520f5d8af2aedd5693bf7314527d76d9af2ef4.tar.gz | |
fetch: use the streaming indexer when downloading a pack
This changes the git_remote_download() API, but the existing one is
silly, so you don't get to complain.
The new API allows to know how much data has been downloaded, how many
objects we expect in total and how many we've processed.
Diffstat (limited to 'src/remote.c')
| -rw-r--r-- | src/remote.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/remote.c b/src/remote.c index b48a23339..bbb491dd8 100644 --- a/src/remote.c +++ b/src/remote.c @@ -297,16 +297,16 @@ int git_remote_ls(git_remote *remote, git_headlist_cb list_cb, void *payload) return remote->transport->ls(remote->transport, list_cb, payload); } -int git_remote_download(char **filename, git_remote *remote) +int git_remote_download(git_remote *remote, git_off_t *bytes, git_indexer_stats *stats) { int error; - assert(filename && remote); + assert(remote && bytes && stats); if ((error = git_fetch_negotiate(remote)) < 0) return error; - return git_fetch_download_pack(filename, remote); + return git_fetch_download_pack(remote, bytes, stats); } int git_remote_update_tips(git_remote *remote) |
