diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-04-22 15:45:21 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-13 09:46:36 +0200 |
| commit | 058b753ceb8f6b25b77e57106b3a87997bc6362a (patch) | |
| tree | 2ad699eda443d924a51d18aaa61c22e10f7eba31 /tests/network/remote/remotes.c | |
| parent | 6fb373a0e8eeff3c94853ff0ac55ca6b561c44a1 (diff) | |
| download | libgit2-058b753ceb8f6b25b77e57106b3a87997bc6362a.tar.gz | |
remote: move the transport ctor to the callbacks
Instead of having it set in a different place from every other callback,
put it the main structure. This removes some state from the remote and
makes it behave more like clone, where the constructors are passed via
the options.
Diffstat (limited to 'tests/network/remote/remotes.c')
| -rw-r--r-- | tests/network/remote/remotes.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/network/remote/remotes.c b/tests/network/remote/remotes.c index 8dbd68f2d..f31993710 100644 --- a/tests/network/remote/remotes.c +++ b/tests/network/remote/remotes.c @@ -80,6 +80,7 @@ void test_network_remote_remotes__error_when_not_found(void) void test_network_remote_remotes__error_when_no_push_available(void) { git_remote *r; + git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT; char *specs = { "refs/heads/master", }; @@ -91,9 +92,8 @@ void test_network_remote_remotes__error_when_no_push_available(void) cl_git_pass(git_remote_create_anonymous(&r, _repo, cl_fixture("testrepo.git"), NULL)); - cl_git_pass(git_remote_set_transport(r, git_transport_local, NULL)); - - cl_git_pass(git_remote_connect(r, GIT_DIRECTION_PUSH, NULL)); + callbacks.transport = git_transport_local; + cl_git_pass(git_remote_connect(r, GIT_DIRECTION_PUSH, &callbacks)); /* Make sure that push is really not available */ r->transport->push = NULL; |
