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

Function reset_fd

parallel-checkout.c:260–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260static 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
269static int write_pc_item_to_fd(struct parallel_checkout_item *pc_item, int fd,
270 const char *path)

Callers 1

write_pc_item_to_fdFunction · 0.85

Calls 1

error_errnoFunction · 0.85

Tested by

no test coverage detected