diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-09-16 05:10:55 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-10-02 06:41:42 +0200 |
commit | d19870d947eef17008ae0b4b7ebc9e9d0038a770 (patch) | |
tree | 48566589f6270d15d92507842e8f9eda32e19c03 /include/git2/clone.h | |
parent | e3c131c544bc79573ebefab4931b5ca89836ace1 (diff) | |
download | libgit2-d19870d947eef17008ae0b4b7ebc9e9d0038a770.tar.gz |
clone: implement git_clone_into
This allows you to set up the repository and remote as you which to
have them before performing the clone operation.
Diffstat (limited to 'include/git2/clone.h')
-rw-r--r-- | include/git2/clone.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/git2/clone.h b/include/git2/clone.h index 38c759f6e..c3936f6b0 100644 --- a/include/git2/clone.h +++ b/include/git2/clone.h @@ -99,6 +99,22 @@ GIT_EXTERN(int) git_clone( const char *local_path, const git_clone_options *options); +/** + * Clone into a repository + * + * After creating the repository and remote and configuring them for + * paths and callbacks respectively, you can call this function to + * perform the clone operation and optionally checkout files. + * + * @param repo the repository to use + * @param remote the remote repository to clone from + * @param co_opts options to use during checkout + * @param branch the branch to checkout after the clone, pass NULL for the remote's + * default branch + * @return 0 on success or an error code + */ +GIT_EXTERN(int) git_clone_into(git_repository *repo, git_remote *remote, git_checkout_opts *co_opts, const char *branch); + /** @} */ GIT_END_DECL #endif |