| 825 | } |
| 826 | |
| 827 | static int graph_is_mapping_correct(struct git_graph *graph) |
| 828 | { |
| 829 | int i; |
| 830 | |
| 831 | /* |
| 832 | * The mapping is up to date if each entry is at its target, |
| 833 | * or is 1 greater than its target. |
| 834 | * (If it is 1 greater than the target, '/' will be printed, so it |
| 835 | * will look correct on the next row.) |
| 836 | */ |
| 837 | for (i = 0; i < graph->mapping_size; i++) { |
| 838 | int target = graph->mapping[i]; |
| 839 | if (target < 0) |
| 840 | continue; |
| 841 | if (target == (i / 2)) |
| 842 | continue; |
| 843 | return 0; |
| 844 | } |
| 845 | |
| 846 | return 1; |
| 847 | } |
| 848 | |
| 849 | static void graph_pad_horizontally(struct git_graph *graph, struct graph_line *line) |
| 850 | { |
no outgoing calls
no test coverage detected