Re: [PATCH v7 03/10] Add colors to interactive git-clean
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- May 13, 2013, 06:57 UTC
- Message-ID
- <vpqbo8ffjuf.fsf@grenoble-inp.fr>
- In-Reply-To
- <CANYiYbGqZ6FiHTZgejrA3a-njffQNJyaefFmCWfycuE6PGjwbA@mail.gmail.com>
Jiang Xin <worldhello.net@gmail.com> writes:
Show 20 quoted lines
> 2013/5/13 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:
>> Jiang Xin <worldhello.net@gmail.com> writes:
>>
>>> * color.interactive.<slot>: Use customized color for interactive
>>> git-clean output (like git add --interactive). <slot> may be
>>> prompt, header, help or error.
>>
>> This should go to the documentation (a short summary is welcome in the
>> commit messages in addition, but users won't read this...)
>>
>>> + if (!prefixcmp(var, "color.interactive.")) {
>>> + int slot = parse_clean_color_slot(var, 18);
>>
>> For readability and maintainability: please use
>> strlen("color.interactive."), not 18.
>
> Feel like conventional:
>
> git grep -C2 prefixcmp builtin/apply.c builtin/archive.c
> builtin/branch.c builtin/checkout.cI know there are already many instances of this in the code, but I don't think it's a good idea to add even more.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/