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

2016-09-27 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 and a bit more efficient. 1eb47f167d65d1d305b9c196a1bb40eb96117cb1 already converted six cases, this patch covers three more. A seman

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

2016-09-27 Thread Junio C Hamano
René Scharfe writes: > diff --git a/diff.c b/diff.c > index a178ed3..be11e4e 100644 > --- a/diff.c > +++ b/diff.c > @@ -3109,7 +3109,7 @@ static void fill_metainfo(struct strbuf *msg, > } > strbuf_addf(msg, "%s%sindex %s..", line_prefix, set, >

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

2016-09-27 Thread René Scharfe
Am 27.09.2016 um 22:28 schrieb Junio C Hamano: > René Scharfe writes: >> diff --git a/submodule.c b/submodule.c >> index dcc5ce3..8cf40ea 100644 >> --- a/submodule.c >> +++ b/submodule.c >> @@ -396,7 +396,7 @@ static void show_submodule_header(FILE *f, const char >> *path, >>

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

2016-10-06 Thread Jeff King
On Tue, Sep 27, 2016 at 09:11:58PM +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 and a bit more efficient. > [...] > diff --git a/diff.c b/diff.c >

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

2016-10-07 Thread René Scharfe
Am 07.10.2016 um 02:46 schrieb Jeff King: On Tue, Sep 27, 2016 at 09:11:58PM +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 and a bit more efficient. [