Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-10-09 23:49:10 +0400
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-10-09 23:49:10 +0400
commit8f9be3167719e86f9f4a087ea4edd4ac168853f0 (patch)
treea24792b5fbf36a129b0792bad8b7b1e656a49f67 /src/fetch.c
parent6aac5afb6d74a016a4066612d99c5a58dea46b40 (diff)
fetch: move 'head' so it's visible to the whole function
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c3
1 files changed, 2 insertions, 1 deletions
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);