Instead of hard coding the name-to-id mapping in C code, keep it in an
array and use a common function to do the parsing. This reduces code
and also allows us to list all possible color slots later.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/branch.c | 28 +
builtin/
On Thu, May 10, 2018 at 7:19 AM, Nguyễn Thái Ngọc Duy wrote:
> 7 files changed, 82 insertions(+), 112 deletions(-)
Nice!
>
> +static const char *color_branch_slots[] = {
> + [BRANCH_COLOR_RESET]= "reset",
In 512f41cfac5 (clean.c: use designated initializer, 2017-07-14)
we thought w
On Thu, May 10, 2018 at 7:16 PM, Stefan Beller wrote:
> On Thu, May 10, 2018 at 7:19 AM, Nguyễn Thái Ngọc Duy
> wrote:
>
>> 7 files changed, 82 insertions(+), 112 deletions(-)
>
> Nice!
>
>
>>
>> +static const char *color_branch_slots[] = {
>> + [BRANCH_COLOR_RESET]= "reset",
>
> In 5
3 matches
Mail list logo