diff options
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r-- | include/git2/remote.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index d57321f03..ddde3e85e 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -468,6 +468,9 @@ struct git_remote_callbacks { /** * This will be called if the remote host requires * authentication in order to connect to it. + * + * Returning GIT_PASSTHROUGH will make libgit2 behave as + * though this field isn't set. */ int (*credentials)(git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *data); @@ -520,6 +523,17 @@ GIT_EXTERN(int) git_remote_init_callbacks( GIT_EXTERN(int) git_remote_set_callbacks(git_remote *remote, const git_remote_callbacks *callbacks); /** + * Retrieve the current callback structure + * + * This provides read access to the callbacks structure as the remote + * sees it. + * + * @param remote the remote to query + * @return a pointer to the callbacks structure + */ +GIT_EXTERN(const git_remote_callbacks *) git_remote_get_callbacks(git_remote *remote); + +/** * Get the statistics structure that is filled in by the fetch operation. */ GIT_EXTERN(const git_transfer_progress *) git_remote_stats(git_remote *remote); |