| 732 | } |
| 733 | |
| 734 | static int graph_num_expansion_rows(struct git_graph *graph) |
| 735 | { |
| 736 | /* |
| 737 | * Normally, we need two expansion rows for each dashed parent line from |
| 738 | * an octopus merge: |
| 739 | * |
| 740 | * | * |
| 741 | * | |\ |
| 742 | * | | \ |
| 743 | * | | \ |
| 744 | * | *-. \ |
| 745 | * | |\ \ \ |
| 746 | * |
| 747 | * If the merge is skewed to the left, then its parents occupy one less |
| 748 | * column, and we don't need as many expansion rows to route around it; |
| 749 | * in some cases that means we don't need any expansion rows at all: |
| 750 | * |
| 751 | * | * |
| 752 | * | |\ |
| 753 | * | * \ |
| 754 | * |/|\ \ |
| 755 | */ |
| 756 | return graph_num_dashed_parents(graph) * 2; |
| 757 | } |
| 758 | |
| 759 | static int graph_needs_pre_commit_line(struct git_graph *graph) |
| 760 | { |
no test coverage detected