A worktree's HEAD is detached when it points directly to a
commit instead of a branch.
@param repo a repository object
@param name name of the worktree to retrieve HEAD for
@return 1 if HEAD is detached, 0 if its not; error code if
there was an error
Check if a worktree's HEAD is detached
A worktree's HEAD is detached when it points directly to a commit instead of a branch.
@param repo a repository object @param name name of the worktree to retrieve HEAD for @return 1 if HEAD is detached, 0 if its not; error code if there was an error