Re: [PATCH v5 3/3] log --graph: customize the graph lines with config log.graphColors

2017-01-19 Thread Junio C Hamano
Junio C Hamano writes: >> Since there's only one line that cares about the result of "colors", >> maybe it would be less confusing to do: >> >> if (!git_config_get-string("log.graphcolors", )) { >> ... parse, etc ... >> graph_set_column_colors(colors.argv,

Re: [PATCH v5 3/3] log --graph: customize the graph lines with config log.graphColors

2017-01-19 Thread Junio C Hamano
Jeff King writes: > On Thu, Jan 19, 2017 at 06:41:23PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> +static void parse_graph_colors_config(struct argv_array *colors, const char >> *string) >> +{ >> +const char *end, *start; >> + >> +start = string; >> +end = string +

Re: [PATCH v5 3/3] log --graph: customize the graph lines with config log.graphColors

2017-01-19 Thread Jeff King
On Thu, Jan 19, 2017 at 06:41:23PM +0700, Nguyễn Thái Ngọc Duy wrote: > +static void parse_graph_colors_config(struct argv_array *colors, const char > *string) > +{ > + const char *end, *start; > + > + start = string; > + end = string + strlen(string); > + while (start < end) { >

[PATCH v5 3/3] log --graph: customize the graph lines with config log.graphColors

2017-01-19 Thread Nguyễn Thái Ngọc Duy
If you have a 256 colors terminal (or one with true color support), then the predefined 12 colors seem limited. On the other hand, you don't want to draw graph lines with every single color in this mode because the two colors could look extremely similar. This option allows you to hand pick the