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

Method remove

pygit2/index.py:181–184  ·  view source on GitHub ↗

Remove an entry from the Index.

(self, path: PathLike[str] | str, level: int = 0)

Source from the content-addressed store, hash-verified

179 return Oid(raw=bytes(ffi.buffer(coid)[:]))
180
181 def remove(self, path: PathLike[str] | str, level: int = 0) -> None:
182 """Remove an entry from the Index."""
183 err = C.git_index_remove(self._index, to_bytes(path), level)
184 check_error(err, io=True)
185
186 def remove_directory(self, path: PathLike[str] | str, level: int = 0) -> None:
187 """Remove a directory from the Index."""

Callers 5

test_remove_noteFunction · 0.45
__init__.pyFile · 0.45
test_removeFunction · 0.45
test_remove_aspathFunction · 0.45

Calls 2

to_bytesFunction · 0.85
check_errorFunction · 0.85

Tested by 4

test_remove_noteFunction · 0.36
test_removeFunction · 0.36
test_remove_aspathFunction · 0.36