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

Method get

pygit2/repository.py:271–273  ·  view source on GitHub ↗
(self, key: Oid | str, default: Optional[Commit] = None)

Source from the content-addressed store, hash-verified

269 # Mapping interface
270 #
271 def get(self, key: Oid | str, default: Optional[Commit] = None) -> None | Object:
272 value = self.git_object_lookup_prefix(key)
273 return value if (value is not None) else default
274
275 def __getitem__(self, key: str | Oid) -> Object:
276 value = self.git_object_lookup_prefix(key)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected