| 497 | } |
| 498 | |
| 499 | static 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 | |
| 522 | static unsigned short graph_get_current_column_color(const struct git_graph *graph) |
| 523 | { |
no test coverage detected