Commit 088334278bf5ecb084f043f0ec526f85fc19554d

Carlos Martín Nieto 2014-03-31T18:43:13

Merge pull request #2219 from tiennou/reset-need-pack Don't reset need_pack

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/fetch.c b/src/fetch.c
index c7d2c83..9ff95d9 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -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 (git_odb_exists(odb, &head->oid)) {
 		head->local = 1;
-		remote->need_pack = 0;
 	}
 	else
 		remote->need_pack = 1;
@@ -107,6 +106,8 @@ int git_fetch_negotiate(git_remote *remote)
 {
 	git_transport *t = remote->transport;
 
+    remote->need_pack = 0;
+
 	if (filter_wants(remote) < 0) {
 		giterr_set(GITERR_NET, "Failed to filter the reference list for wants");
 		return -1;