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

Method read

pygit2/index.py:109–121  ·  view source on GitHub ↗

Update the contents of the Index by reading from a file. Parameters: force If True (the default) always reload. If False, only if the file has changed.

(self, force: bool = True)

Source from the content-addressed store, hash-verified

107 return GenericIterator(self)
108
109 def read(self, force: bool = True) -> None:
110 """
111 Update the contents of the Index by reading from a file.
112
113 Parameters:
114
115 force
116 If True (the default) always reload. If False, only if the file
117 has changed.
118 """
119
120 err = C.git_index_read(self._index, force)
121 check_error(err, io=True)
122
123 def write(self) -> None:
124 """Write the contents of the Index to disk."""

Callers 15

test_readFunction · 0.45
test_readFunction · 0.45
test_blobioFunction · 0.45
test_blobio_filteredFunction · 0.45
test_set_urlFunction · 0.45
test_keypair_from_memoryFunction · 0.45
test_objectsFunction · 0.45
read_cbMethod · 0.45
read_header_cbMethod · 0.45

Calls 1

check_errorFunction · 0.85

Tested by 15

test_readFunction · 0.36
test_readFunction · 0.36
test_blobioFunction · 0.36
test_blobio_filteredFunction · 0.36
test_set_urlFunction · 0.36
test_keypair_from_memoryFunction · 0.36
test_objectsFunction · 0.36
read_cbMethod · 0.36
read_header_cbMethod · 0.36