clone_repository() function not working
gmpuran opened this issue · 5 comments
gmpuran commented
Example given in the docs for clone repository results in empty repository at mentioned path.
from pygit2 import clone_repository
repo_url = 'git://github.com/libgit2/pygit2.git'
repo_path = '/path/to/create/repository'
repo = clone_repository(repo_url, repo_path) # Clones a non-bare repository
Code execution doesn't yield any errors, any clues?
pypingou commented
Which version are you using?
gmpuran commented
Hi pypingou,
pygit2 - v0.21.2
libgit2 - v0.21.0
carlosmn commented
It looks to be down to us not overriding the default checkout strategy, which is a no-op.
carlosmn commented
Or rather, by not initializing with libgit2's defaults, which makes it checkout by default.
carlosmn commented
FTR the repository isn't empty, just its worktree.