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

Function test_branch_upstream_name

test/test_branch_empty.py:133–140  ·  view source on GitHub ↗
(repo: Repository)

Source from the content-addressed store, hash-verified

131
132
133def test_branch_upstream_name(repo: Repository) -> None:
134 remote_master = repo.lookup_branch('origin/master', BranchType.REMOTE)
135 commit = repo[remote_master.target]
136 assert isinstance(commit, Commit)
137 master = repo.create_branch('master', commit)
138
139 master.upstream = remote_master
140 assert master.upstream_name == 'refs/remotes/origin/master'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…