diff options
Diffstat (limited to 'graph.c')
-rw-r--r-- | graph.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -4,7 +4,7 @@ #include "color.h" #include "graph.h" #include "revision.h" -#include "argv-array.h" +#include "strvec.h" /* Internal API */ @@ -82,7 +82,7 @@ static void graph_show_line_prefix(const struct diff_options *diffopt) 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; @@ -93,13 +93,13 @@ static void parse_graph_colors_config(struct argv_array *colors, const char *str 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) @@ -350,13 +350,13 @@ struct git_graph *graph_init(struct rev_info *opt) 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); } } |