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

Method open

pygit2/submodules.py:63–69  ·  view source on GitHub ↗

Open the repository for a submodule.

(self)

Source from the content-addressed store, hash-verified

61 C.git_submodule_free(self._subm)
62
63 def open(self) -> Repository:
64 """Open the repository for a submodule."""
65 crepo = ffi.new('git_repository **')
66 err = C.git_submodule_open(crepo, self._subm)
67 check_error(err)
68
69 return self._repo._from_c(crepo[0], True) # type: ignore[attr-defined]
70
71 def init(self, overwrite: bool = False) -> None:
72 """

Callers 15

test_submodule_openFunction · 0.80
test_oneshot_updateFunction · 0.80
test_add_submoduleFunction · 0.80
test_submodule_statusFunction · 0.80
check_writingFunction · 0.80
test_checkout_indexFunction · 0.80
test_checkout_headFunction · 0.80
test_reset_hardFunction · 0.80
test_reset_softFunction · 0.80

Calls 2

check_errorFunction · 0.85
_from_cMethod · 0.45

Tested by 15

test_submodule_openFunction · 0.64
test_oneshot_updateFunction · 0.64
test_add_submoduleFunction · 0.64
test_submodule_statusFunction · 0.64
check_writingFunction · 0.64
test_checkout_indexFunction · 0.64
test_checkout_headFunction · 0.64
test_reset_hardFunction · 0.64
test_reset_softFunction · 0.64