summaryrefslogtreecommitdiff
path: root/src/fetch.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-09-18 20:07:49 +0200
committerVicent Marti <tanoku@gmail.com>2011-10-12 21:33:18 +0200
commit1636ba5a0dc5c6c050a851951aa499572f820da0 (patch)
tree79f2dd2de6a23ff7df8e31d6be034292980595c7 /src/fetch.c
parent747bf5f14c8fa3d26cfcdc093ea9c1c553ed09c6 (diff)
downloadlibgit2-1636ba5a0dc5c6c050a851951aa499572f820da0.tar.gz
transport: don't have an extra send-wants step
It's a bit awkward to run it as an extra step, and HTTP may need to send the wants list several times. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/fetch.c b/src/fetch.c
index cc3744b89..8602cd7fe 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -103,7 +103,6 @@ cleanup:
int git_fetch_negotiate(git_remote *remote)
{
int error;
- git_headarray *list = &remote->refs;
git_transport *t = remote->transport;
error = filter_wants(remote);
@@ -111,7 +110,7 @@ int git_fetch_negotiate(git_remote *remote)
return git__rethrow(error, "Failed to filter the reference list for wants");
/* Don't try to negotiate when we don't want anything */
- if (list->len == 0)
+ if (remote->refs.len == 0)
return GIT_SUCCESS;
if (!remote->need_pack)
return GIT_SUCCESS;
@@ -120,10 +119,6 @@ int git_fetch_negotiate(git_remote *remote)
* Now we have everything set up so we can start tell the server
* what we want and what we have.
*/
- error = t->send_wants(t, list);
- if (error < GIT_SUCCESS)
- return git__rethrow(error, "Failed to send want list");
-
return t->negotiate_fetch(t, remote->repo, &remote->refs);
}