libgit2

git_worktree_is_locked

Version:

Check if worktree is locked

A worktree may be locked if the linked working tree is stored on a portable device which is not available.

Signature

int git_worktree_is_locked(git_buf *reason, const git_worktree *wt);

Parameters

In
reason

Buffer to store reason in. If NULL no reason is stored.

In
wt

Worktree to check

Returns

int

0 when the working tree not locked, a value greater than zero if it is locked, less than zero if there was an error

Versions