libgit2

git_worktree_lock

Version:

Lock worktree if not already locked

Lock a worktree, optionally specifying a reason why the linked working tree is being locked.

Signature

int git_worktree_lock(git_worktree *wt, const char *reason);

Parameters

In
wt

Worktree to lock

const char *
In
reason

Reason why the working tree is being locked

Returns

int

0 on success, non-zero otherwise

Versions