MCPcopy Index your code
hub / github.com/git/git / read_in_full

Function read_in_full

wrapper.c:286–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286ssize_t read_in_full(int fd, void *buf, size_t count)
287{
288 char *p = buf;
289 ssize_t total = 0;
290
291 while (count > 0) {
292 ssize_t loaded = xread(fd, p, count);
293 if (loaded < 0)
294 return -1;
295 if (loaded == 0)
296 return total;
297 count -= loaded;
298 p += loaded;
299 total += loaded;
300 }
301
302 return total;
303}
304
305ssize_t write_in_full(int fd, const void *buf, size_t count)
306{

Callers 15

validate_headrefFunction · 0.85
read_gitfile_gentlyFunction · 0.85
parse_gitmodules_oidsFunction · 0.85
do_fetch_pack_v2Function · 0.85
has_unreachableFunction · 0.85
grep_source_load_fileFunction · 0.85
check_collisionFunction · 0.85
index_coreFunction · 0.85
read_pack_headerFunction · 0.85
ll_ext_mergeFunction · 0.85
get_packet_dataFunction · 0.85
open_packed_git_1Function · 0.85

Calls 1

xreadFunction · 0.85

Tested by

no test coverage detected