summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clone.c2
-rw-r--r--src/remote.c13
-rw-r--r--src/remote.h2
-rw-r--r--src/transports/local.c2
4 files changed, 2 insertions, 17 deletions
diff --git a/src/clone.c b/src/clone.c
index 90d677bbb..8385fb264 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -310,8 +310,6 @@ static int create_and_configure_origin(
if ((error = git_remote_create(&origin, repo, options->remote_name, url)) < 0)
goto on_error;
- git_remote_set_cred_acquire_cb(origin, options->cred_acquire_cb,
- options->cred_acquire_payload);
git_remote_set_autotag(origin, options->remote_autotag);
/*
* Don't write FETCH_HEAD, we'll check out the remote tracking
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);
diff --git a/src/remote.h b/src/remote.h
index dce4803ed..269584d96 100644
--- a/src/remote.h
+++ b/src/remote.h
@@ -21,8 +21,6 @@ struct git_remote {
char *pushurl;
git_vector refs;
git_vector refspecs;
- git_cred_acquire_cb cred_acquire_cb;
- void *cred_acquire_payload;
git_transport *transport;
git_repository *repo;
git_remote_callbacks callbacks;
diff --git a/src/transports/local.c b/src/transports/local.c
index 9ebea979c..3c1f98804 100644
--- a/src/transports/local.c
+++ b/src/transports/local.c
@@ -434,7 +434,7 @@ static int local_push(
if (!url || t->parent.close(&t->parent) < 0 ||
t->parent.connect(&t->parent, url,
- push->remote->cred_acquire_cb, NULL, GIT_DIRECTION_PUSH, flags))
+ push->remote->callbacks.credentials, NULL, GIT_DIRECTION_PUSH, flags))
goto on_error;
}