diff options
author | Vicent Marti <vicent@github.com> | 2014-07-11 16:49:23 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-07-11 16:49:23 +0200 |
commit | 44cfb6f387555722e84b0997ecff4718b40dd23f (patch) | |
tree | 1d3346f6f091889987cef65018f3521bfaecb7b4 /include/git2 | |
parent | 863dabdabad7f2fa7fea0d582c09714e2cf2178e (diff) | |
parent | d4256ed554fa64f762d53cb2a64663e5095d3eb5 (diff) | |
download | libgit2-44cfb6f387555722e84b0997ecff4718b40dd23f.tar.gz |
Merge pull request #2463 from libgit2/cmn/ssh-factory-for-paths
ssh: provide a factory function for setting ssh paths
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/transport.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h index 1df264ea1..67939a747 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -336,6 +336,22 @@ GIT_EXTERN(int) git_transport_init( */ GIT_EXTERN(int) git_transport_new(git_transport **out, git_remote *owner, const char *url); +/** + * Create an ssh transport with custom git command paths + * + * This is a factory function suitable for setting as the transport + * callback in a remote (or for a clone in the options). + * + * The payload argument must be a strarray pointer with the paths for + * the `git-upload-pack` and `git-receive-pack` at index 0 and 1. + * + * @param out the resulting transport + * @param owner the owning remote + * @param payload a strarray with the paths + * @return 0 or an error code + */ +GIT_EXTERN(int) git_transport_ssh_with_paths(git_transport **out, git_remote *owner, void *payload); + /* Signature of a function which creates a transport */ typedef int (*git_transport_cb)(git_transport **out, git_remote *owner, void *param); |