diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-01-27 06:26:49 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-27 12:09:34 -0800 |
commit | 3a73c1dfafcc53831a252fc3aededeb59be476f1 (patch) | |
tree | c48120162da73dcb96b4a31afd0400ddd9a2ce6e /ppc | |
parent | object-name: iterate ambiguous objects before showing header (diff) | |
download | tgif-3a73c1dfafcc53831a252fc3aededeb59be476f1.tar.xz |
object-name: re-use "struct strbuf" in show_ambiguous_object()
Reduce the allocations done by show_ambiguous_object() by moving the
"desc" strbuf into the "struct ambiguous_output" introduced in the
preceding commit.
This doesn't matter for optimization purposes, but since we're
accumulating a "struct strbuf advice" anyway let's follow that pattern
and add a "struct strbuf sb", we can then strbuf_reset() it rather
than calling strbuf_release() for each call to
show_ambiguous_object().
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ppc')
0 files changed, 0 insertions, 0 deletions