Commit 31143b36 by Etienne Samson

Don't reset need_pack

While looping over multiple heads, an up-to-date head will clobber the `remote->need_pack` setting, preventing the rest of the machinery from building and downloading a pack-file, breaking fetches.
parent 7b445c21
...@@ -44,7 +44,6 @@ static int maybe_want(git_remote *remote, git_remote_head *head, git_odb *odb, g ...@@ -44,7 +44,6 @@ static int maybe_want(git_remote *remote, git_remote_head *head, git_odb *odb, g
/* If we have the object, mark it so we don't ask for it */ /* If we have the object, mark it so we don't ask for it */
if (git_odb_exists(odb, &head->oid)) { if (git_odb_exists(odb, &head->oid)) {
head->local = 1; head->local = 1;
remote->need_pack = 0;
} }
else else
remote->need_pack = 1; remote->need_pack = 1;
...@@ -107,6 +106,8 @@ int git_fetch_negotiate(git_remote *remote) ...@@ -107,6 +106,8 @@ int git_fetch_negotiate(git_remote *remote)
{ {
git_transport *t = remote->transport; git_transport *t = remote->transport;
remote->need_pack = 0;
if (filter_wants(remote) < 0) { if (filter_wants(remote) < 0) {
giterr_set(GITERR_NET, "Failed to filter the reference list for wants"); giterr_set(GITERR_NET, "Failed to filter the reference list for wants");
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment