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

Function hashfd_check

csum-file.c:149–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149struct hashfile *hashfd_check(const struct git_hash_algo *algop,
150 const char *name)
151{
152 int sink, check;
153 struct hashfile *f;
154
155 sink = xopen("/dev/null", O_WRONLY);
156 check = xopen(name, O_RDONLY);
157 f = hashfd(algop, sink, name);
158 f->check_fd = check;
159 f->check_buffer = xmalloc(f->buffer_len);
160
161 return f;
162}
163
164struct hashfile *hashfd_ext(const struct git_hash_algo *algop,
165 int fd, const char *name,

Callers 2

write_idx_fileFunction · 0.85
write_rev_file_orderFunction · 0.85

Calls 3

xopenFunction · 0.85
hashfdFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected