MCPcopy Index your code
hub / github.com/git/git / copy_to_log

Function copy_to_log

daemon.c:431–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429}
430
431static void copy_to_log(int fd)
432{
433 struct strbuf line = STRBUF_INIT;
434 FILE *fp;
435
436 fp = fdopen(fd, "r");
437 if (!fp) {
438 logerror("fdopen of error channel failed");
439 close(fd);
440 return;
441 }
442
443 while (strbuf_getline_lf(&line, fp) != EOF) {
444 logerror("%s", line.buf);
445 strbuf_setlen(&line, 0);
446 }
447
448 strbuf_release(&line);
449 fclose(fp);
450}
451
452static int run_service_command(struct child_process *cld)
453{

Callers 1

run_service_commandFunction · 0.85

Calls 4

logerrorFunction · 0.85
strbuf_getline_lfFunction · 0.85
strbuf_setlenFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected