Code

cherry-pick: format help message as strbuf
authorJeff King <peff@peff.net>
Thu, 11 Feb 2010 21:07:06 +0000 (16:07 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Feb 2010 06:11:03 +0000 (22:11 -0800)
commit08565bdb4b5d1da597ed8b90d1a23729f7c006d0
tree76622bf234ef4d2c4220df1dc34c250ed75123b1
parentdd9314cc2a2f353bf9438db14cbbf02a1c219bda
cherry-pick: format help message as strbuf

This gets rid of the fixed-size buffer and an unchecked
sprintf. That sprintf is actually OK as the only
variable-sized thing put in it is an abbreviated sha1, which
is bounded at 40 characters. However, the next patch will
change that to something unbounded.

Note that this function now returns an allocated buffer
instead of a static one; however, it doesn't matter as the
only caller exits immediately.

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