mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 17:05:49 +00:00
fetch: move 'head' so it's visible to the whole function
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
This commit is contained in:
parent
6aac5afb6d
commit
8f9be31677
@ -20,6 +20,7 @@ static int filter_wants(git_remote *remote)
|
|||||||
{
|
{
|
||||||
git_vector list;
|
git_vector list;
|
||||||
git_headarray refs;
|
git_headarray refs;
|
||||||
|
git_remote_head *head;
|
||||||
git_transport *t = remote->transport;
|
git_transport *t = remote->transport;
|
||||||
git_repository *repo = remote->repo;
|
git_repository *repo = remote->repo;
|
||||||
const git_refspec *spec;
|
const git_refspec *spec;
|
||||||
@ -62,7 +63,7 @@ static int filter_wants(git_remote *remote)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (; i < refs.len; ++i) {
|
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 */
|
/* If it doesn't match the refpec, we don't want it */
|
||||||
error = git_refspec_src_match(spec, head->name);
|
error = git_refspec_src_match(spec, head->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user