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

Function read_lines

reftable/stack.c:111–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111int read_lines(const char *filename, char ***namesp)
112{
113 int fd = open(filename, O_RDONLY);
114 int err = 0;
115 if (fd < 0) {
116 if (errno == ENOENT) {
117 REFTABLE_CALLOC_ARRAY(*namesp, 1);
118 if (!*namesp)
119 return REFTABLE_OUT_OF_MEMORY_ERROR;
120 return 0;
121 }
122
123 return REFTABLE_IO_ERROR;
124 }
125 err = fd_read_lines(fd, namesp);
126 close(fd);
127 return err;
128}
129
130int reftable_stack_init_ref_iterator(struct reftable_stack *st,
131 struct reftable_iterator *it)

Callers 4

reftable_stack_destroyFunction · 0.85
stack_uptodateFunction · 0.85

Calls 1

fd_read_linesFunction · 0.85

Tested by 1