libgit2

git_repository_open_from_worktree

Version:

Open working tree as a repository

Open the working directory of the working tree as a normal repository that can then be worked on.

Signature

int git_repository_open_from_worktree(git_repository **out, git_worktree *wt);

Parameters

In
out

Output pointer containing opened repository

In
wt

Working tree to open

Returns

int

0 or an error code

Versions