libgit2

git_worktree_open_from_repository

Version:

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.

Signature

int git_worktree_open_from_repository(git_worktree **out, git_repository *repo);

Parameters

In
out

Out-pointer for the newly allocated worktree

In
repo

Repository to look up worktree for

Returns

int

Versions