describe: use strbuf_add_unique_abbrev() for adding short hashes
authorRené Scharfe <l.s.r@web.de>
Mon, 15 Jan 2018 17:10:32 +0000 (18:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Jan 2018 21:21:51 +0000 (13:21 -0800)
commitfbac558a9bde48fa23b9c536357ab17c71b4bd22
tree86b34bc6a0ca43639df1f22eb76ec2e8267833c1
parent0c37383f2ecfce28f67dbc49704ab3755d41eed0
describe: use strbuf_add_unique_abbrev() for adding short hashes

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 <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/describe.c