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