Re: [PATCH v5 01/11] ref-filter: introduce 'ref_formatting_state'

2015-07-27 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: +static void ref_formatting(struct ref_formatting_state *state, +struct atom_value *v, struct strbuf *value) { - struct strbuf sb = STRBUF_INIT; - switch (quote_style) { + strbuf_addf(value, %s, v-s); +}

Re: [PATCH v5 01/11] ref-filter: introduce 'ref_formatting_state'

2015-07-27 Thread Karthik Nayak
On Mon, Jul 27, 2015 at 6:12 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: +static void ref_formatting(struct ref_formatting_state *state, +struct atom_value *v, struct strbuf *value) { - struct strbuf sb =

[PATCH v5 01/11] ref-filter: introduce 'ref_formatting_state'

2015-07-27 Thread Karthik Nayak
Introduce 'ref_formatting' structure to hold values of pseudo atoms which help only in formatting. This will eventually be used by atoms like `color` and the `padright` atom which will be introduced in a later patch. Helped-by: Junio C Hamano gits...@pobox.com Mentored-by: Christian Couder