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

Function parse_graph_colors_config

graph.c:85–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83static unsigned short column_colors_max;
84
85static void parse_graph_colors_config(struct strvec *colors, const char *string)
86{
87 const char *end, *start;
88
89 start = string;
90 end = string + strlen(string);
91 while (start < end) {
92 const char *comma = strchrnul(start, ',');
93 char color[COLOR_MAXLEN];
94
95 if (!color_parse_mem(start, comma - start, color))
96 strvec_push(colors, color);
97 else
98 warning(_("ignored invalid color '%.*s' in log.graphColors"),
99 (int)(comma - start), start);
100 start = comma + 1;
101 }
102 strvec_push(colors, GIT_COLOR_RESET);
103}
104
105void graph_set_column_colors(const char **colors, unsigned short colors_max)
106{

Callers 1

graph_initFunction · 0.85

Calls 3

color_parse_memFunction · 0.85
strvec_pushFunction · 0.85
warningFunction · 0.85

Tested by

no test coverage detected