]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
sequencer: use logmsg_reencode in get_message
authorJeff King <peff@peff.net>
Tue, 10 Jun 2014 21:39:35 +0000 (17:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Jun 2014 17:29:43 +0000 (10:29 -0700)
commitd74a4e57d2703e841deed994752b948a768f31ec
treec50cf98bf55f2a5d72be1c021fdc9d3f97c9f7c5
parentb000c59b0c80fc187e5e0e48dc9396cd60576c4e
sequencer: use logmsg_reencode in get_message

This simplifies the code, as logmsg_reencode handles the
reencoding for us in a single call. It also means we learn
logmsg_reencode's trick of pulling the buffer from disk when
commit->buffer is NULL (we currently just silently return!).
It is doubtful this matters in practice, though, as
sequencer operations would not generally turn off
save_commit_buffer.

Note that we may be fixing a bug here. The existing code
does:

  if (same_encoding(to, from))
  reencode_string(buf, to, from);

That probably should have been "!same_encoding".

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