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.
Buffer to store reason in. If null no reason is stored.
Worktree to check
0 when the working tree not locked, a value greater than zero if it is locked, less than zero if there was an error
See Implementation
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.