Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-10-02 Thread René Scharfe
Am 15.09.2016 um 23:39 schrieb Junio C Hamano: > René Scharfe writes: > >> Am 15.09.2016 um 22:01 schrieb Junio C Hamano: >>> René Scharfe writes: >>> Take this for example: - strbuf_addf(>obuf, _("(bad commit)\n")); +

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread brian m. carlson
On Thu, Sep 15, 2016 at 08:31:00PM +0200, René Scharfe wrote: > Replace uses of strbuf_addf() for adding strings with more lightweight > strbuf_addstr() calls. This makes the intent clearer and avoids > potential issues with printf format specifiers. > > 02962d36845b89145cd69f8bc65e015d78ae3434

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Junio C Hamano
René Scharfe writes: > Am 15.09.2016 um 22:01 schrieb Junio C Hamano: >> René Scharfe writes: >> >>> Take this for example: >>> >>> - strbuf_addf(>obuf, _("(bad commit)\n")); >>> + strbuf_addstr(>obuf, _("(bad commit)\n")); >>>

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread René Scharfe
Am 15.09.2016 um 22:01 schrieb Junio C Hamano: > René Scharfe writes: > >> Take this for example: >> >> -strbuf_addf(>obuf, _("(bad commit)\n")); >> +strbuf_addstr(>obuf, _("(bad commit)\n")); >> >> If there's a language that uses percent

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Junio C Hamano
René Scharfe writes: > Take this for example: > > - strbuf_addf(>obuf, _("(bad commit)\n")); > + strbuf_addstr(>obuf, _("(bad commit)\n")); > > If there's a language that uses percent signs instead of parens or as > regular letters, then they

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread René Scharfe
Am 15.09.2016 um 21:38 schrieb Jeff King: On Thu, Sep 15, 2016 at 12:25:43PM -0700, Junio C Hamano wrote: Silly question: Is there a natural language that uses percent signs as letters or e.g. instead of commas? :) I don't know, but if they do, they'd better get used to escaping them. :) I

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 12:25:43PM -0700, Junio C Hamano wrote: > >> Silly question: Is there a natural language that uses percent signs > >> as letters or e.g. instead of commas? :) > > > > I don't know, but if they do, they'd better get used to escaping them. > > :) > > I do not know either,

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Junio C Hamano
Jeff King writes: > On Thu, Sep 15, 2016 at 08:31:00PM +0200, René Scharfe wrote: > >> Replace uses of strbuf_addf() for adding strings with more lightweight >> strbuf_addstr() calls. This makes the intent clearer and avoids >> potential issues with printf format specifiers. >>

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 08:31:00PM +0200, René Scharfe wrote: > Replace uses of strbuf_addf() for adding strings with more lightweight > strbuf_addstr() calls. This makes the intent clearer and avoids > potential issues with printf format specifiers. > > 02962d36845b89145cd69f8bc65e015d78ae3434

[PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread René Scharfe
Replace uses of strbuf_addf() for adding strings with more lightweight strbuf_addstr() calls. This makes the intent clearer and avoids potential issues with printf format specifiers. 02962d36845b89145cd69f8bc65e015d78ae3434 already converted six cases, this patch covers eleven more. A semantic