diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-06-25 16:24:26 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-06-26 22:58:38 +0200 |
| commit | d1c281a5525882c4a6f157ea1f18837d5819dab3 (patch) | |
| tree | 1df9f7b6aa1afeb34d9d86eb997b3d1cb5054369 /include/git2 | |
| parent | 54da69588e9560694b6687d3384ac53f18aa11ea (diff) | |
| download | libgit2-d1c281a5525882c4a6f157ea1f18837d5819dab3.tar.gz | |
cred: add convenience function to get the username
Since each cred defines the username on their own, introduce
git_cred__username to retrieve the username pointer from them.
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/transport.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h index d1322a10b..b57d1dd7f 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -221,6 +221,14 @@ GIT_EXTERN(int) git_cred_ssh_custom_new( GIT_EXTERN(int) git_cred_default_new(git_cred **out); /** + * Create a credential to specify a username. + * + * This is used with ssh authentication to query for the username if + * none is specified in the url. + */ +GIT_EXTERN(int) git_cred_username_new(git_cred **cred, const char *username); + +/** * Signature of a function which acquires a credential object. * * - cred: The newly created credential object. |
