Re: [PATCH] describe: use strbuf_add_unique_abbrev() for adding short hashes

2018-01-19 Thread René Scharfe
Am 18.01.2018 um 23:40 schrieb SZEDER Gábor: > On Thu, Jan 18, 2018 at 10:40 PM, René Scharfe wrote: >> Am 16.01.2018 um 18:11 schrieb SZEDER Gábor: >>> Unfortunately, most of the changes coming from 'strbuf.cocci' don't >>> make any sense, they appear to be the mis-application of

Re: [PATCH] describe: use strbuf_add_unique_abbrev() for adding short hashes

2018-01-18 Thread Lars Schneider
> On 18 Jan 2018, at 23:40, SZEDER Gábor wrote: > > On Thu, Jan 18, 2018 at 10:40 PM, René Scharfe wrote: >> Am 16.01.2018 um 18:11 schrieb SZEDER Gábor: >>> Unfortunately, most of the changes coming from 'strbuf.cocci' don't >>> make any sense, they appear

Re: [PATCH] describe: use strbuf_add_unique_abbrev() for adding short hashes

2018-01-18 Thread SZEDER Gábor
On Thu, Jan 18, 2018 at 10:40 PM, René Scharfe wrote: > Am 16.01.2018 um 18:11 schrieb SZEDER Gábor: >> Unfortunately, most of the changes coming from 'strbuf.cocci' don't >> make any sense, they appear to be the mis-application of the "use >> strbuf_addstr() instead of

Re: [PATCH] describe: use strbuf_add_unique_abbrev() for adding short hashes

2018-01-18 Thread René Scharfe
Am 16.01.2018 um 18:11 schrieb SZEDER Gábor: > Unfortunately, most of the changes coming from 'strbuf.cocci' don't > make any sense, they appear to be the mis-application of the "use > strbuf_addstr() instead of strbuf_addf() to add a single string" rule: > >- strbuf_addf(_repo,

Re: [PATCH] describe: use strbuf_add_unique_abbrev() for adding short hashes

2018-01-16 Thread SZEDER Gábor
> Patch generated by Coccinelle (and contrib/coccinelle/strbuf.cocci). Interesting. The static analysis build job on Travis CI runs 'make coccicheck', so it should have caught this. However, I've looked at more build job results than I could count while working on some Travis CI related patches

Re: [PATCH] describe: use strbuf_add_unique_abbrev() for adding short hashes

2018-01-16 Thread Derrick Stolee
On 1/15/2018 12:10 PM, René Scharfe wrote: Call strbuf_add_unique_abbrev() to add an abbreviated hash to a strbuf instead of taking a detour through find_unique_abbrev() and its static buffer. This is shorter and a bit more efficient. Patch generated by Coccinelle (and

[PATCH] describe: use strbuf_add_unique_abbrev() for adding short hashes

2018-01-15 Thread René Scharfe
Call strbuf_add_unique_abbrev() to add an abbreviated hash to a strbuf instead of taking a detour through find_unique_abbrev() and its static buffer. This is shorter and a bit more efficient. Patch generated by Coccinelle (and contrib/coccinelle/strbuf.cocci). Signed-off-by: Rene Scharfe