Re: [PATCH] use strbuf_add_unique_abbrev() for adding short hashes, part 3

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:46:21PM +0200, René Scharfe wrote: > Good question. ALLOC_GROW() doesn't double exactly, but indeed the > number of reallocations depends on the size of the added pieces. I > always thought of strbuf_addf() as an expensive function for > convenience, but never timed

Re: [PATCH] use strbuf_add_unique_abbrev() for adding short hashes, part 3

2016-10-10 Thread René Scharfe
Am 10.10.2016 um 02:00 schrieb Jeff King: > On Sat, Oct 08, 2016 at 05:38:47PM +0200, René Scharfe wrote: > >> Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs >> instead of taking detours through find_unique_abbrev() and its static >> buffer. This is shorter in most cases

Re: [PATCH] use strbuf_add_unique_abbrev() for adding short hashes, part 3

2016-10-09 Thread Jeff King
On Sat, Oct 08, 2016 at 05:38:47PM +0200, René Scharfe wrote: > Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs > instead of taking detours through find_unique_abbrev() and its static > buffer. This is shorter in most cases and a bit more efficient. > > The changes here are

[PATCH] use strbuf_add_unique_abbrev() for adding short hashes, part 3

2016-10-08 Thread René Scharfe
Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs instead of taking detours through find_unique_abbrev() and its static buffer. This is shorter in most cases and a bit more efficient. The changes here are not easily handled by a semantic patch because they involve removing