| 147 | } |
| 148 | |
| 149 | struct 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 | |
| 164 | struct hashfile *hashfd_ext(const struct git_hash_algo *algop, |
| 165 | int fd, const char *name, |
no test coverage detected