summaryrefslogtreecommitdiff
path: root/include/git2
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 /include/git2
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 'include/git2')
-rw-r--r--include/git2/clone.h5
-rw-r--r--include/git2/remote.h1
2 files changed, 1 insertions, 5 deletions
diff --git a/include/git2/clone.h b/include/git2/clone.h
index 122806ad5..38c759f6e 100644
--- a/include/git2/clone.h
+++ b/include/git2/clone.h
@@ -48,9 +48,6 @@ GIT_BEGIN_DECL
* results in the same behavior as GIT_REMOTE_DEFAULT_FETCH.
* - `push_spec` is the fetch specification to be used for pushing. NULL means
* use the same spec as for fetching.
- * - `cred_acquire_cb` is a callback to be used if credentials are required
- * during the initial fetch.
- * - `cred_acquire_payload` is the payload for the above callback.
* - `transport_flags` is flags used to create transport if no transport is
* provided.
* - `transport` is a custom transport to be used for the initial fetch. NULL
@@ -74,8 +71,6 @@ typedef struct git_clone_options {
const char *pushurl;
const char *fetch_spec;
const char *push_spec;
- git_cred_acquire_cb cred_acquire_cb;
- void *cred_acquire_payload;
git_transport_flags_t transport_flags;
git_transport *transport;
git_remote_callbacks *remote_callbacks;
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 2bde5e365..83ad195f4 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -395,6 +395,7 @@ struct git_remote_callbacks {
unsigned int version;
void (*progress)(const char *str, int len, void *data);
int (*completion)(git_remote_completion_type type, void *data);
+ int (*credentials)(git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *data);
int (*transfer_progress)(const git_transfer_progress *stats, void *data);
int (*update_tips)(const char *refname, const git_oid *a, const git_oid *b, void *data);
void *payload;