Re: [PATCH v9 19/20] branch: use ref-filter printing APIs

2016-12-28 Thread Karthik Nayak
On Wed, Dec 28, 2016 at 2:47 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> static char branch_colors[][COLOR_MAXLEN] = { >> - GIT_COLOR_RESET, >> - GIT_COLOR_NORMAL, /* PLAIN */ >> - GIT_COLOR_RED, /* REMOTE */ >> -

Re: [PATCH v9 19/20] branch: use ref-filter printing APIs

2016-12-27 Thread Junio C Hamano
Karthik Nayak writes: > static char branch_colors[][COLOR_MAXLEN] = { > - GIT_COLOR_RESET, > - GIT_COLOR_NORMAL, /* PLAIN */ > - GIT_COLOR_RED, /* REMOTE */ > - GIT_COLOR_NORMAL, /* LOCAL */ > - GIT_COLOR_GREEN,/* CURRENT

[PATCH v9 19/20] branch: use ref-filter printing APIs

2016-12-27 Thread Karthik Nayak
From: Karthik Nayak Port branch.c to use ref-filter APIs for printing. This clears out most of the code used in branch.c for printing and replaces them with calls made to the ref-filter library. Introduce build_format() which gets the format required for printing of refs.