Skip to content

remote.fetch depth= parameter broken with anonymous remotes #1314

Open
@spwhitton

Description

@spwhitton
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

ping @nikitalita

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions