diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-04-20 04:43:28 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-04-20 17:54:13 +0200 |
commit | 4330ab26b53c0e1bf8cbb5e65704f65e3d116eba (patch) | |
tree | 14bf8d854854298bfe43b3a02c8c26f59377c988 /src/fetch.c | |
parent | e5a27f039ee3ae1291fd5084707c3f9c168f10ba (diff) | |
download | libgit2-4330ab26b53c0e1bf8cbb5e65704f65e3d116eba.tar.gz |
remote: handle multiple refspecs
A remote can have a multitude of refspecs. Up to now our git_remote's
have supported a single one for each fetch and push out of simplicity
to get something working.
Let the remotes and internal code know about multiple remotes and get
the tests passing with them.
Instead of setting a refspec, the external users can clear all and add
refspecs. This should be enough for most uses, though we're still
missing a querying function.
Diffstat (limited to 'src/fetch.c')
-rw-r--r-- | src/fetch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fetch.c b/src/fetch.c index b60a95232..8ae34bddf 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -34,7 +34,7 @@ static int filter_ref__cb(git_remote_head *head, void *payload) if (!p->found_head && strcmp(head->name, GIT_HEAD_FILE) == 0) p->found_head = 1; - else if (git_refspec_src_matches(p->spec, head->name)) + else if (git_remote__matching_refspec(p->remote, head->name)) match = 1; else if (p->remote->download_tags == GIT_REMOTE_DOWNLOAD_TAGS_ALL && git_refspec_src_matches(p->tagspec, head->name)) @@ -68,7 +68,6 @@ static int filter_wants(git_remote *remote) * not interested in any particular branch but just the remote's * HEAD, which will be stored in FETCH_HEAD after the fetch. */ - p.spec = git_remote_fetchspec(remote); p.tagspec = &tagspec; p.found_head = 0; p.remote = remote; |