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

Function graph_is_mapping_correct

graph.c:827–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

825}
826
827static 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
849static void graph_pad_horizontally(struct git_graph *graph, struct graph_line *line)
850{

Callers 3

graph_output_commit_lineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected