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

Method get

pygit2/references.py:48–52  ·  view source on GitHub ↗
(self, key: str)

Source from the content-addressed store, hash-verified

46 return self._repository.lookup_reference(name)
47
48 def get(self, key: str) -> 'Reference' | None:
49 try:
50 return self[key]
51 except KeyError:
52 return None
53
54 def __iter__(self) -> Iterator[str]:
55 iter = self._repository.references_iterator_init()

Callers 1

__contains__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected