Files
git/builtin
Jeff King b66103c3ba convert logmsg_reencode to get_commit_buffer
Like the callsites in the previous commit, logmsg_reencode
already falls back to read_sha1_file when necessary.
However, I split its conversion out into its own commit
because it's a bit more complex.

We return either:

  1. The original commit->buffer

  2. A newly allocated buffer from read_sha1_file

  3. A reencoded buffer (based on either 1 or 2 above).

while trying to do as few extra reads/allocations as
possible. Callers currently free the result with
logmsg_free, but we can simplify this by pointing them
straight to unuse_commit_buffer. This is a slight layering
violation, in that we may be passing a buffer from (3).
However, since the end result is to free() anything except
(1), which is unlikely to change, and because this makes the
interface much simpler, it's a reasonable bending of the
rules.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-13 12:08:17 -07:00
..
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-03-14 14:25:31 -07:00
2014-01-17 12:21:20 -08:00
2014-02-27 14:01:30 -08:00
2014-06-13 12:07:47 -07:00
2014-04-03 12:38:47 -07:00
2014-06-13 12:07:47 -07:00
2014-03-25 11:02:02 -07:00
2014-04-08 12:00:33 -07:00
2013-12-17 12:02:44 -08:00
2013-07-15 10:56:07 -07:00
2014-01-17 12:21:20 -08:00