diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-04-19 15:52:58 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-04-22 14:34:26 +0200 |
commit | bc0a61986745b89258a98773f88bd98c44ef88d5 (patch) | |
tree | e86cff8daec29c4eb82c214ca01baac4f9a43533 /include | |
parent | 2efd7df6b11e8c646d05870965bb4588d6b6d425 (diff) | |
download | libgit2-bc0a61986745b89258a98773f88bd98c44ef88d5.tar.gz |
transports: allow the creds callback to say it doesn't exist
Allow the credentials callback to return GIT_PASSTHROUGH to make the
transports code behave as though none was set.
This should make it easier for bindings to behave closer to the C code
when there is no credentials callback set at their level.
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/remote.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index 578fcf51b..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); |