Re: [PATCH v4] log --graph: customize the graph lines with config log.graphColors
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 12, 2017, 12:20 UTC
- Message-ID
- <CACsJy8AbdDxsSUDSx7=kezjPOCQnhpNdwKyMvb-xQ+d7wd99Tw@mail.gmail.com>
- In-Reply-To
- <xmqqh958uoot.fsf@gitster.mtv.corp.google.com>
Just FYI. The broken internet cables in Vietnam seem to hit my ISP really hard. It's nearly impossible to make a TCP connection. So I'm basically off the grid, hopefully not longer than two weeks.
On 1/10/17, Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
>> + end = string + strlen(string);
>> + while (start < end) {
>> + const char *comma = strchrnul(start, ',');
>> + char color[COLOR_MAXLEN];
>> +
>> + while (start < comma && isspace(*start))
>> + start++;
>> + if (start == comma) {
>> + start = comma + 1;
>> + continue;
>> + }
>> +
>> + if (!color_parse_mem(start, comma - start, color))
>
> So you skip the leading blanks but let color_parse_mem() trim the
> trailing blanks? It would work once the control reaches the loop,
> but wouldn't that miss
>
> git -c log.graphColors=' reset , blue, red' log --graph
>
> as "reset" is not