summaryrefslogtreecommitdiff
path: root/src/fetch.c
diff options
context:
space:
mode:
authorMiha <miha.ravselj@ib-caddy.si>2014-02-25 14:57:47 +0100
committerMiha <miha.ravselj@ib-caddy.si>2014-02-25 14:57:47 +0100
commit3536c168c354906e2109f49a474f51117fc9b7db (patch)
treef8fb30132a58141dbc037ff8aab6664ac3ae62fd /src/fetch.c
parent300f44125a5abb00f6185babc9bb828aec556015 (diff)
downloadlibgit2-3536c168c354906e2109f49a474f51117fc9b7db.tar.gz
- need_pack was not set to 0 when local fetch was already present causing negotiate_fetch access violation
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fetch.c b/src/fetch.c
index 5bf2b93c1..c7d2c83a1 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -42,8 +42,10 @@ static int maybe_want(git_remote *remote, git_remote_head *head, git_odb *odb, g
return 0;
/* 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;
+ remote->need_pack = 0;
+ }
else
remote->need_pack = 1;