You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import os
import pygit2
source = pygit2.Repository("pygit2")
dest = pygit2.init_repository("dest", bare=True)
remote = dest.remotes.create_anonymous(f'file://{os.path.abspath("pygit2")}')
remote.fetch(depth=1, refspecs=[f"refs/tags/v1.15.1:refs/tags/v1.15.1"])
# now if you 'git log v1.15.1' in ./dest you'll see many commits, not just one
Note: The test for the shallow clone is currently online only due to libgit2 only supporting shallow clones of remote repositories. The git cli allows you to shallow clone a local repository if you use a file URI, but it seems that libgit2 doesn't support that.
ping @nikitalita
Thanks.
The text was updated successfully, but these errors were encountered: