summaryrefslogtreecommitdiff
path: root/src/remote.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-09-16 05:02:25 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-10-02 06:41:42 +0200
commite3c131c544bc79573ebefab4931b5ca89836ace1 (patch)
treeb64b640a89ad709ba63f31dcc5e6658552e14cb4 /src/remote.c
parentd31402a3fc4aa1b7d48ba43fd3bb072e7d69a527 (diff)
downloadlibgit2-e3c131c544bc79573ebefab4931b5ca89836ace1.tar.gz
remote: move the credentials callback to the struct
Move this one as well, letting us have a single way of setting the callbacks for the remote, and removing fields from the clone options.
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/remote.c b/src/remote.c
index e4696c4ec..2d0321eb3 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -591,7 +591,7 @@ int git_remote_connect(git_remote *remote, git_direction direction)
if (!remote->check_cert)
flags |= GIT_TRANSPORTFLAGS_NO_CHECK_CERT;
- if (t->connect(t, url, remote->cred_acquire_cb, remote->cred_acquire_payload, direction, flags) < 0)
+ if (t->connect(t, url, remote->callbacks.credentials, remote->callbacks.payload, direction, flags) < 0)
goto on_error;
remote->transport = t;
@@ -1152,17 +1152,6 @@ int git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callbacks
return 0;
}
-void git_remote_set_cred_acquire_cb(
- git_remote *remote,
- git_cred_acquire_cb cred_acquire_cb,
- void *payload)
-{
- assert(remote);
-
- remote->cred_acquire_cb = cred_acquire_cb;
- remote->cred_acquire_payload = payload;
-}
-
int git_remote_set_transport(git_remote *remote, git_transport *transport)
{
assert(remote && transport);