logmsg_reencode: return const buffer
commitb000c59b0c80fc187e5e0e48dc9396cd60576c4e
authorJeff King <peff@peff.net>
Tue, 10 Jun 2014 21:39:30 +0000 (10 17:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Jun 2014 17:29:43 +0000 (12 10:29 -0700)
treeeceae4f00fdd8ddc384ec7d04739686e7b3ea4e1
parent10322a0aaf84382d8901f9ab59e59c39f0c035bb
logmsg_reencode: return const buffer

The return value from logmsg_reencode may be either a newly
allocated buffer or a pointer to the existing commit->buffer.
We would not want the caller to accidentally free() or
modify the latter, so let's mark it as const.  We can cast
away the constness in logmsg_free, but only once we have
determined that it is a free-able buffer.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/blame.c
builtin/reset.c
commit.h
pretty.c
revision.c