pygit2
pygit2 copied to clipboard
add_worktree fails with non-bare repo
I'm trying to add a worktree with
_pygit2.add_worktree(name, path, _pygit2.lookup_reference(ref))
ref is fetched using _pygit2.raw_listall_references(). This works for bare git repo.
In case of non-bare git repo, it fails with,
_pygit2.GitError: reference is not a branch