MCPcopy Create free account
hub / github.com/libgit2/pygit2 / test_clone_with_checkout_branch

Function test_clone_with_checkout_branch

test/test_repository.py:798–809  ·  view source on GitHub ↗
(barerepo: Repository, tmp_path: Path)

Source from the content-addressed store, hash-verified

796
797
798def test_clone_with_checkout_branch(barerepo: Repository, tmp_path: Path) -> None:
799 # create a test case which isolates the remote
800 test_repo = clone_repository(
801 barerepo.path, tmp_path / 'testrepo-orig.git', bare=True
802 )
803 commit = test_repo[test_repo.head.target]
804 assert isinstance(commit, Commit)
805 test_repo.create_branch('test', commit)
806 repo = clone_repository(
807 test_repo.path, tmp_path / 'testrepo.git', checkout_branch='test', bare=True
808 )
809 assert repo.lookup_reference('HEAD').target == 'refs/heads/test'
810
811
812@utils.requires_proxy

Callers

nothing calls this directly

Calls 1

clone_repositoryFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…