diff options
author | Vicent Marti <vicent@github.com> | 2014-04-22 15:07:18 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-04-22 15:07:18 +0200 |
commit | a32d684f866e7710fd139d69ad5d1a8d0ae527c4 (patch) | |
tree | e86cff8daec29c4eb82c214ca01baac4f9a43533 /include/git2/remote.h | |
parent | dac95e4aa33a21c2180566558726e1a3d5c0399a (diff) | |
parent | bc0a61986745b89258a98773f88bd98c44ef88d5 (diff) | |
download | libgit2-a32d684f866e7710fd139d69ad5d1a8d0ae527c4.tar.gz |
Merge pull request #2282 from libgit2/cmn/remote-easier-bind
A few niceties for binding authors
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); |