diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2017-03-22 20:32:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-22 20:32:55 +0000 |
| commit | f623cf894a7e2591e7b4424b24143d1a7584cf9e (patch) | |
| tree | eff28ba6a1a91f51fb71a07969e688fcf1ecc8cd /include/git2 | |
| parent | 6fd6c67824d2caad9f8716a676820d8319f79a9d (diff) | |
| parent | b0c9bc920fabfd814946d555738ac7ba042154d7 (diff) | |
| download | libgit2-f623cf894a7e2591e7b4424b24143d1a7584cf9e.tar.gz | |
Merge pull request #4163 from pks-t/pks/submodules-with-worktrees
Worktree fixes
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/worktree.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/worktree.h b/include/git2/worktree.h index cad1284fa..4c4f9284d 100644 --- a/include/git2/worktree.h +++ b/include/git2/worktree.h @@ -44,6 +44,18 @@ GIT_EXTERN(int) git_worktree_list(git_strarray *out, git_repository *repo); GIT_EXTERN(int) git_worktree_lookup(git_worktree **out, git_repository *repo, const char *name); /** + * Open a worktree of a given repository + * + * If a repository is not the main tree but a worktree, this + * function will look up the worktree inside the parent + * repository and create a new `git_worktree` structure. + * + * @param out Out-pointer for the newly allocated worktree + * @param repo Repository to look up worktree for + */ +GIT_EXTERN(int) git_worktree_open_from_repository(git_worktree **out, git_repository *repo); + +/** * Free a previously allocated worktree * * @param wt worktree handle to close. If NULL nothing occurs. |
