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

Function graph_ensure_capacity

graph.c:438–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438static void graph_ensure_capacity(struct git_graph *graph, int num_columns)
439{
440 if (graph->column_capacity >= num_columns)
441 return;
442
443 do {
444 graph->column_capacity *= 2;
445 } while (graph->column_capacity < num_columns);
446
447 REALLOC_ARRAY(graph->columns, graph->column_capacity);
448 REALLOC_ARRAY(graph->new_columns, graph->column_capacity);
449 REALLOC_ARRAY(graph->mapping, graph->column_capacity * 2);
450 REALLOC_ARRAY(graph->old_mapping, graph->column_capacity * 2);
451}
452
453/*
454 * Returns 1 if the commit will be printed in the graph output,

Callers 1

graph_update_columnsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected