MCPcopy Create free account
hub / github.com/git/git / read_block

Function read_block

reftable/block.c:214–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214static int read_block(struct reftable_block_source *source,
215 struct reftable_block_data *dest, uint64_t off,
216 uint32_t sz)
217{
218 size_t size = block_source_size(source);
219 block_source_release_data(dest);
220 if (off >= size)
221 return 0;
222 if (off + sz > size)
223 sz = size - off;
224 return block_source_read_data(source, dest, off, sz);
225}
226
227int reftable_block_init(struct reftable_block *block,
228 struct reftable_block_source *source,

Callers 1

reftable_block_initFunction · 0.85

Calls 3

block_source_sizeFunction · 0.85
block_source_read_dataFunction · 0.85

Tested by

no test coverage detected