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

Function graph_num_expansion_rows

graph.c:734–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

732}
733
734static 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
759static int graph_needs_pre_commit_line(struct git_graph *graph)
760{

Callers 2

Calls 1

graph_num_dashed_parentsFunction · 0.85

Tested by

no test coverage detected