summaryrefslogtreecommitdiff
path: root/tests-clar/online/push.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-11-02 00:05:32 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2013-11-11 15:35:51 +0100
commit359dce726d215be65aee719c7316b43e3851c031 (patch)
tree7a4a0c0af01d2d02683a3aed27eca8315f1f9ca0 /tests-clar/online/push.c
parent266af6d81960144334c16e061f1d30f94f8a1b46 (diff)
downloadlibgit2-359dce726d215be65aee719c7316b43e3851c031.tar.gz
remote: make _ls return the list directly
The callback-based method of listing remote references dates back to the beginning of the network code's lifetime, when we didn't know any better. We need to keep the list around for update_tips() after disconnect() so let's make use of this to simply give the user a pointer to the array so they can write straightforward code instead of having to go through a callback.
Diffstat (limited to 'tests-clar/online/push.c')
-rw-r--r--tests-clar/online/push.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests-clar/online/push.c b/tests-clar/online/push.c
index 5a747bba7..9ed97174b 100644
--- a/tests-clar/online/push.c
+++ b/tests-clar/online/push.c
@@ -155,10 +155,11 @@ static void do_verify_push_status(git_push *push, const push_status expected[],
*/
static void verify_refs(git_remote *remote, expected_ref expected_refs[], size_t expected_refs_len)
{
- git_vector actual_refs = GIT_VECTOR_INIT;
+ const git_remote_head **actual_refs;
+ size_t actual_refs_len;
- git_remote_ls(remote, record_ref_cb, &actual_refs);
- verify_remote_refs(&actual_refs, expected_refs, expected_refs_len);
+ git_remote_ls(&actual_refs, &actual_refs_len, remote);
+ verify_remote_refs(actual_refs, actual_refs_len, expected_refs, expected_refs_len);
git_vector_free(&actual_refs);
}