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

Function search_line_log_data

line-log.c:268–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268static struct line_log_data *
269search_line_log_data(struct line_log_data *list, const char *path,
270 struct line_log_data **insertion_point)
271{
272 struct line_log_data *p = list;
273 if (insertion_point)
274 *insertion_point = NULL;
275 while (p) {
276 int cmp = strcmp(p->path, path);
277 if (!cmp)
278 return p;
279 if (insertion_point && cmp < 0)
280 *insertion_point = p;
281 p = p->next;
282 }
283 return NULL;
284}
285
286/*
287 * Note: takes ownership of 'path', which happens to be what the only

Callers 2

line_log_data_insertFunction · 0.85
parse_linesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected