#include "color.h"
#include "graph.h"
#include "revision.h"
-#include "argv-array.h"
+#include "strvec.h"
/* Internal API */
static const char **column_colors;
static unsigned short column_colors_max;
-static void parse_graph_colors_config(struct argv_array *colors, const char *string)
+static void parse_graph_colors_config(struct strvec *colors, const char *string)
{
const char *end, *start;
char color[COLOR_MAXLEN];
if (!color_parse_mem(start, comma - start, color))
- argv_array_push(colors, color);
+ strvec_push(colors, color);
else
warning(_("ignore invalid color '%.*s' in log.graphColors"),
(int)(comma - start), start);
start = comma + 1;
}
- argv_array_push(colors, GIT_COLOR_RESET);
+ strvec_push(colors, GIT_COLOR_RESET);
}
void graph_set_column_colors(const char **colors, unsigned short colors_max)
graph_set_column_colors(column_colors_ansi,
column_colors_ansi_max);
} else {
- static struct argv_array custom_colors = ARGV_ARRAY_INIT;
- argv_array_clear(&custom_colors);
+ static struct strvec custom_colors = STRVEC_INIT;
+ strvec_clear(&custom_colors);
parse_graph_colors_config(&custom_colors, string);
free(string);
/* graph_set_column_colors takes a max-index, not a count */
- graph_set_column_colors(custom_colors.argv,
- custom_colors.argc - 1);
+ graph_set_column_colors(custom_colors.v,
+ custom_colors.nr - 1);
}
}