diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-30 04:38:05 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-30 04:38:05 +0200 |
| commit | af6cc38fc0acba14277ebfd247e0a46a867a2c33 (patch) | |
| tree | def8c9608166385421ca769972b93258e1066db8 /include/git2/submodule.h | |
| parent | 3a728fb508ea3eea8033a9e338c61a6421ad21b2 (diff) | |
| parent | a2a23322193eeca5d2912c0b74c5374f8ec21737 (diff) | |
| download | libgit2-af6cc38fc0acba14277ebfd247e0a46a867a2c33.tar.gz | |
Merge remote-tracking branch 'upstream/master' into cmn/describe
Diffstat (limited to 'include/git2/submodule.h')
| -rw-r--r-- | include/git2/submodule.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index 28e235725..616890df6 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -283,7 +283,7 @@ GIT_EXTERN(const char *) git_submodule_url(git_submodule *submodule); * Resolve a submodule url relative to the given repository. * * @param out buffer to store the absolute submodule url in - * @param repository Pointer to repository object + * @param repo Pointer to repository object * @param url Relative url * @return 0 or an error code */ @@ -471,6 +471,24 @@ GIT_EXTERN(git_submodule_recurse_t) git_submodule_set_fetch_recurse_submodules( GIT_EXTERN(int) git_submodule_init(git_submodule *submodule, int overwrite); /** + * Set up the subrepository for a submodule in preparation for clone. + * + * This function can be called to init and set up a submodule + * repository from a submodule in preparation to clone it from + * its remote. + * + * @param out Output pointer to the created git repository. + * @param sm The submodule to create a new subrepository from. + * @param use_gitlink Should the workdir contain a gitlink to + * the repo in .git/modules vs. repo directly in workdir. + * @return 0 on success, <0 on failure. + */ +GIT_EXTERN(int) git_submodule_repo_init( + git_repository **out, + const git_submodule *sm, + int use_gitlink); + +/** * Copy submodule remote info into submodule repo. * * This copies the information about the submodules URL into the checked out |
