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

Method init

pygit2/submodules.py:71–83  ·  view source on GitHub ↗

Just like "git submodule init", this copies information about the submodule into ".git/config". Parameters: overwrite By default, existing submodule entries will not be overwritten, but setting this to True forces them to be updated.

(self, overwrite: bool = False)

Source from the content-addressed store, hash-verified

69 return self._repo._from_c(crepo[0], True) # type: ignore[attr-defined]
70
71 def init(self, overwrite: bool = False) -> None:
72 """
73 Just like "git submodule init", this copies information about the submodule
74 into ".git/config".
75
76 Parameters:
77
78 overwrite
79 By default, existing submodule entries will not be overwritten,
80 but setting this to True forces them to be updated.
81 """
82 err = C.git_submodule_init(self._subm, int(overwrite))
83 check_error(err)
84
85 def update(
86 self,

Callers 6

test_submodule_openFunction · 0.45
test_init_and_updateFunction · 0.45
test_specified_updateFunction · 0.45
test_update_instanceFunction · 0.45
initMethod · 0.45

Calls 1

check_errorFunction · 0.85

Tested by 5

test_submodule_openFunction · 0.36
test_init_and_updateFunction · 0.36
test_specified_updateFunction · 0.36
test_update_instanceFunction · 0.36