| 83 | static unsigned short column_colors_max; |
| 84 | |
| 85 | static 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 | |
| 105 | void graph_set_column_colors(const char **colors, unsigned short colors_max) |
| 106 | { |
no test coverage detected