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

Method remove_all

pygit2/index.py:191–195  ·  view source on GitHub ↗

Remove all index entries matching pathspecs.

(self, pathspecs: typing.Sequence[str | PathLike[str]])

Source from the content-addressed store, hash-verified

189 check_error(err, io=True)
190
191 def remove_all(self, pathspecs: typing.Sequence[str | PathLike[str]]) -> None:
192 """Remove all index entries matching pathspecs."""
193 with StrArray(pathspecs) as arr:
194 err = C.git_index_remove_all(self._index, arr.ptr, ffi.NULL, ffi.NULL)
195 check_error(err, io=True)
196
197 def add_all(self, pathspecs: None | list[str | PathLike[str]] = None) -> None:
198 """Add or update index entries matching files in the working directory.

Callers 2

test_remove_allFunction · 0.80
test_remove_all_aspathFunction · 0.80

Calls 2

StrArrayClass · 0.85
check_errorFunction · 0.85

Tested by 2

test_remove_allFunction · 0.64
test_remove_all_aspathFunction · 0.64