pygit2 icon indicating copy to clipboard operation
pygit2 copied to clipboard

add_worktree fails with non-bare repo

Open vigneshraman opened this issue 3 years ago • 0 comments

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

vigneshraman avatar Jun 01 '22 10:06 vigneshraman