| 258 | } |
| 259 | |
| 260 | static int reset_fd(int fd, const char *path) |
| 261 | { |
| 262 | if (lseek(fd, 0, SEEK_SET) != 0) |
| 263 | return error_errno("failed to rewind descriptor of '%s'", path); |
| 264 | if (ftruncate(fd, 0)) |
| 265 | return error_errno("failed to truncate file '%s'", path); |
| 266 | return 0; |
| 267 | } |
| 268 | |
| 269 | static int write_pc_item_to_fd(struct parallel_checkout_item *pc_item, int fd, |
| 270 | const char *path) |
no test coverage detected