diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-07-30 22:29:00 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-08-18 02:34:07 +0200 |
| commit | b4c9063040efdc2bbb2d32704234e0d9c2159b4e (patch) | |
| tree | 60bbbf125614305760d7068b5ca90953bfdc1a25 /src/fetch.c | |
| parent | 0e20ba606655d25aa3fdeb9948a55e40107ac269 (diff) | |
| download | libgit2-b4c9063040efdc2bbb2d32704234e0d9c2159b4e.tar.gz | |
Implement sending haves
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/fetch.c')
| -rw-r--r-- | src/fetch.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fetch.c b/src/fetch.c index 59beb1ea3..c799c805f 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -38,8 +38,8 @@ */ static int whn_cmp(const void *a, const void *b) { - git_remote_head *heada = *(git_remote_head **)(a); - git_remote_head *headb = *(git_remote_head **)(b); + git_remote_head *heada = (git_remote_head *) a; + git_remote_head *headb = (git_remote_head *) b; return headb->type - heada->type; } @@ -57,7 +57,7 @@ int git_fetch_list_want(git_headarray *whn_list, git_repository *repo, git_remot int error; unsigned int i; - error = git_vector_init(&list, whn_list->len, whn_cmp); + error = git_vector_init(&list, 16, whn_cmp); if (error < GIT_SUCCESS) return error; @@ -182,8 +182,8 @@ int git_fetch_negotiate(git_headarray *list, git_repository *repo, git_remote *r * Now we have everything set up so we can start tell the server * what we want and what we have. */ - git_remote_send_wants(remote, list); - + git_transport_send_wants(remote->transport, list); + git_transport_send_haves(remote->transport, repo); cleanup: git_revwalk_free(walk); |
