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

Function diff_output_prefix_callback

graph.c:329–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329static const char *diff_output_prefix_callback(struct diff_options *opt, void *data)
330{
331 struct git_graph *graph = data;
332
333 assert(opt);
334
335 if (!graph)
336 return opt->line_prefix;
337
338 strbuf_reset(&graph->prefix_buf);
339 if (opt->line_prefix)
340 strbuf_addstr(&graph->prefix_buf, opt->line_prefix);
341 graph_padding_line(graph, &graph->prefix_buf);
342 return graph->prefix_buf.buf;
343}
344
345static const struct diff_options *default_diffopt;
346

Callers

nothing calls this directly

Calls 2

strbuf_addstrFunction · 0.85
graph_padding_lineFunction · 0.85

Tested by

no test coverage detected