From 8f9be3167719e86f9f4a087ea4edd4ac168853f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sun, 9 Oct 2011 21:49:10 +0200 Subject: [PATCH] fetch: move 'head' so it's visible to the whole function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Martín Nieto --- src/fetch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fetch.c b/src/fetch.c index 3c3dbcb5b..cc3744b89 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -20,6 +20,7 @@ static int filter_wants(git_remote *remote) { git_vector list; git_headarray refs; + git_remote_head *head; git_transport *t = remote->transport; git_repository *repo = remote->repo; const git_refspec *spec; @@ -62,7 +63,7 @@ static int filter_wants(git_remote *remote) } for (; i < refs.len; ++i) { - git_remote_head *head = refs.heads[i]; + head = refs.heads[i]; /* If it doesn't match the refpec, we don't want it */ error = git_refspec_src_match(spec, head->name);