Re: [PATCH v3 13/16] ref-filter: allow porcelain to translate messages in the output

2016-04-04 Thread Junio C Hamano
Matthieu Moy writes: > I'm not sure how important it is in this case, but it was in the case of > setup_unpack_trees_porcelain which I took inspiration from when we > discussed this (actually, in setup_unpack_trees_porcelain, there's isn't > any translation even in porcelain). OK, so paraphrase:

Re: [PATCH v3 13/16] ref-filter: allow porcelain to translate messages in the output

2016-04-04 Thread Matthieu Moy
Karthik Nayak writes: > cc'ing Matthieu since this patch was initially written by him. > > On Thu, Mar 31, 2016 at 3:28 AM, Junio C Hamano wrote: >> Karthik Nayak writes: >> >>> +static struct ref_msg { >>> + const char *gone; >>> + const char *ahead; >>> + const char *behind; >>> +

Re: [PATCH v3 13/16] ref-filter: allow porcelain to translate messages in the output

2016-04-01 Thread Karthik Nayak
cc'ing Matthieu since this patch was initially written by him. On Thu, Mar 31, 2016 at 3:28 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> +static struct ref_msg { >> + const char *gone; >> + const char *ahead; >> + const char *behind; >> + const char *ahead_behind; >> +}

Re: [PATCH v3 13/16] ref-filter: allow porcelain to translate messages in the output

2016-03-30 Thread Junio C Hamano
Karthik Nayak writes: > +static struct ref_msg { > + const char *gone; > + const char *ahead; > + const char *behind; > + const char *ahead_behind; > +} msgs = { > + "gone", > + "ahead %d", > + "behind %d", > + "ahead %d, behind %d" > +}; > + > +void setup_ref_filt

[PATCH v3 13/16] ref-filter: allow porcelain to translate messages in the output

2016-03-30 Thread Karthik Nayak
Introduce setup_ref_filter_porcelain_msg() so that the messages used in the atom %(upstream:track) can be translated if needed. This is needed as we port branch.c to use ref-filter's printing API's. Written-by: Matthieu Moy Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: