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

Function first_interesting_parent

graph.c:499–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499static struct commit_list *first_interesting_parent(struct git_graph *graph)
500{
501 struct commit_list *parents = graph->commit->parents;
502
503 /*
504 * If this commit has no parents, ignore it
505 */
506 if (!parents)
507 return NULL;
508
509 /*
510 * If the first parent is interesting, return it
511 */
512 if (graph_is_interesting(graph, parents->item))
513 return parents;
514
515 /*
516 * Otherwise, call next_interesting_parent() to get
517 * the next interesting parent
518 */
519 return next_interesting_parent(graph, parents);
520}
521
522static unsigned short graph_get_current_column_color(const struct git_graph *graph)
523{

Callers 4

graph_update_columnsFunction · 0.85
graph_updateFunction · 0.85
graph_output_commit_lineFunction · 0.85

Calls 2

graph_is_interestingFunction · 0.85
next_interesting_parentFunction · 0.85

Tested by

no test coverage detected