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

Method _common_init

pygit2/repository.py:121–132  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

119 self._common_init()
120
121 def _common_init(self) -> None:
122 self.branches = Branches(self)
123 self.references = References(self)
124 self.remotes = RemoteCollection(self)
125 self.submodules = SubmoduleCollection(self)
126 self._active_transaction = None
127
128 # Get the pointer as the contents of a buffer and store it for
129 # later access
130 repo_cptr = ffi.new('git_repository **')
131 ffi.buffer(repo_cptr)[:] = self._pointer[:]
132 self._repo = repo_cptr[0]
133
134 # Backwards compatible ODB access
135 def read(self, oid: Oid | str) -> tuple[int, bytes]:

Callers 2

__init__Method · 0.95
_from_cMethod · 0.80

Calls 4

BranchesClass · 0.85
ReferencesClass · 0.85
RemoteCollectionClass · 0.85
SubmoduleCollectionClass · 0.85

Tested by

no test coverage detected