commit: fix pretty-printing of messages with "\nencoding "
The function replace_encoding_header is given the whole
commit buffer, including the commit message. When looking
for the encoding header, if none was found in the header, it
would locate any line in the commit message matching
"\nencoding " and remove it.
Instead, we now make sure to search only to the end of the
Signed-off-by: Jeff King <email@example.com>
Signed-off-by: Junio C Hamano <firstname.lastname@example.org>
1 file changed