show-branch: use a strbuf for reflog descriptions
commit78f23bdf68dae56d644892990484951583a64014
authorJeff King <peff@peff.net>
Wed, 19 Aug 2015 18:12:48 +0000 (19 14:12 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 Sep 2015 16:48:26 +0000 (4 09:48 -0700)
tree324187d0682f989593a532d231acf8472d4d2f2b
parent5015f01c12a45a1042c1aa6b6f7f6b62bfa00ade
show-branch: use a strbuf for reflog descriptions

When we show "branch@{0}", we format into a fixed-size
buffer using sprintf. This can overflow if you have long
branch names. We can fix it by using a temporary strbuf.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/show-branch.c