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

Function flush

csum-file.c:31–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static void flush(struct hashfile *f, const void *buf, unsigned int count)
32{
33 if (0 <= f->check_fd && count)
34 verify_buffer_or_die(f, buf, count);
35
36 if (write_in_full(f->fd, buf, count) < 0) {
37 if (errno == ENOSPC)
38 die("sha1 file '%s' write error. Out of diskspace", f->name);
39 die_errno("sha1 file '%s' write error", f->name);
40 }
41
42 f->total += count;
43 display_throughput(f->tp, f->total);
44}
45
46void hashflush(struct hashfile *f)
47{

Callers 3

hashflushFunction · 0.70
finalize_hashfileFunction · 0.70
hashwriteFunction · 0.70

Calls 5

verify_buffer_or_dieFunction · 0.85
write_in_fullFunction · 0.85
die_errnoFunction · 0.85
display_throughputFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected