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

Method get

pygit2/branches.py:75–79  ·  view source on GitHub ↗
(self, key: str)

Source from the content-addressed store, hash-verified

73 return branch
74
75 def get(self, key: str) -> Branch:
76 try:
77 return self[key]
78 except KeyError:
79 return None # type:ignore # next commit
80
81 def __iter__(self) -> Iterator[str]:
82 for branch_name in self._repository.listall_branches(self._flag):

Callers 15

__iter__Method · 0.95
__contains__Method · 0.95
test_branches_remote_getFunction · 0.45
test_blob_write_to_queueFunction · 0.45
test_lookup_submoduleFunction · 0.45
test_branches_getitemFunction · 0.45
test_branches_deleteFunction · 0.45
test_branches_is_headFunction · 0.45
test_branches_renameFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_branches_remote_getFunction · 0.36
test_blob_write_to_queueFunction · 0.36
test_lookup_submoduleFunction · 0.36
test_branches_getitemFunction · 0.36
test_branches_deleteFunction · 0.36
test_branches_is_headFunction · 0.36
test_branches_renameFunction · 0.36