Re: [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf,

2017-01-15 Thread Elia Pinto
2017-01-15 3:42 GMT+01:00 Junio C Hamano : > Elia Pinto writes: > >> Ok. I agree. But is it strictly necessary to resend for this ? > > FWIW, the attacched is what I queued locally, after complaining > "both have the same title? They need to be

Re: [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf,

2017-01-14 Thread Junio C Hamano
Elia Pinto writes: > Ok. I agree. But is it strictly necessary to resend for this ? FWIW, the attacched is what I queued locally, after complaining "both have the same title? They need to be explained better." In any case, I sense that 2/2 will be redone using

Re: [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf,

2017-01-14 Thread Jeff King
On Sat, Jan 14, 2017 at 05:31:39PM +0100, René Scharfe wrote: > Perhaps I missed it from the discussion, but why not use strbuf? It > would avoid counting the generated string's length. That's probably > not going to make a measurable difference performance-wise, but it's > easy to avoid and

Re: [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf,

2017-01-14 Thread René Scharfe
Am 13.01.2017 um 18:58 schrieb Elia Pinto: > In this patch, instead of using xnprintf instead of snprintf, which asserts > that we don't truncate, we are switching to dynamic allocation with > xstrfmt(), > , so we can avoid dealing with magic numbers in the code and reduce the > cognitive

Re: [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf,

2017-01-14 Thread Elia Pinto
Ok. I agree. But is it strictly necessary to resend for this ? Thanks 2017-01-13 19:33 GMT+01:00 Brandon Williams : > On 01/13, Elia Pinto wrote: >> In this patch, instead of using xnprintf instead of snprintf, which asserts >> that we don't truncate, we are switching to

Re: [PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf,

2017-01-13 Thread Brandon Williams
On 01/13, Elia Pinto wrote: > In this patch, instead of using xnprintf instead of snprintf, which asserts > that we don't truncate, we are switching to dynamic allocation with > xstrfmt(), > , so we can avoid dealing with magic numbers in the code and reduce the > cognitive burden from > the

[PATCHv3 2/2] builtin/commit.c: switch to xstrfmt(), instead of snprintf,

2017-01-13 Thread Elia Pinto
In this patch, instead of using xnprintf instead of snprintf, which asserts that we don't truncate, we are switching to dynamic allocation with xstrfmt(), , so we can avoid dealing with magic numbers in the code and reduce the cognitive burden from the programmers, because they no longer have to