diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-04-20 06:43:28 +0400 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-04-20 19:54:13 +0400 |
commit | 4330ab26b53c0e1bf8cbb5e65704f65e3d116eba (patch) | |
tree | 14bf8d854854298bfe43b3a02c8c26f59377c988 /tests-clar/refs | |
parent | e5a27f039ee3ae1291fd5084707c3f9c168f10ba (diff) |
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 'tests-clar/refs')
-rw-r--r-- | tests-clar/refs/branches/remote.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests-clar/refs/branches/remote.c b/tests-clar/refs/branches/remote.c index 2beef3724..475fa54a8 100644 --- a/tests-clar/refs/branches/remote.c +++ b/tests-clar/refs/branches/remote.c @@ -69,7 +69,8 @@ void test_refs_branches_remote__ambiguous_remote_returns_error(void) cl_git_pass(git_remote_create(&remote, g_repo, "addtest", "http://github.com/libgit2/libgit2")); /* Update the remote fetch spec */ - cl_git_pass(git_remote_set_fetchspec(remote, "refs/heads/*:refs/remotes/test/*")); + git_remote_clear_refspecs(remote); + cl_git_pass(git_remote_add_fetchspec(remote, "refs/heads/*:refs/remotes/test/*")); cl_git_pass(git_remote_save(remote)); git_remote_free(remote); |