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

Method add_all

pygit2/index.py:197–206  ·  view source on GitHub ↗

Add or update index entries matching files in the working directory. If pathspecs are specified, only files matching those pathspecs will be added.

(self, pathspecs: None | list[str | PathLike[str]] = None)

Source from the content-addressed store, hash-verified

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.
199
200 If pathspecs are specified, only files matching those pathspecs will
201 be added.
202 """
203 pathspecs = pathspecs or []
204 with StrArray(pathspecs) as arr:
205 err = C.git_index_add_all(self._index, arr.ptr, 0, ffi.NULL, ffi.NULL)
206 check_error(err, io=True)
207
208 def add(self, path_or_entry: 'IndexEntry | str | PathLike[str]') -> None:
209 """Add or update an entry in the Index.

Callers 3

test_submodule_statusFunction · 0.80
test_add_allFunction · 0.80
test_add_all_aspathFunction · 0.80

Calls 2

StrArrayClass · 0.85
check_errorFunction · 0.85

Tested by 3

test_submodule_statusFunction · 0.64
test_add_allFunction · 0.64
test_add_all_aspathFunction · 0.64