提交 1d5bd615 编写于 作者: N Nguyễn Thái Ngọc Duy 提交者: Junio C Hamano

pretty.c: use original commit message if reencoding fails

Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 9cd7a92b
......@@ -1022,8 +1022,11 @@ void format_commit_message(const struct commit *commit,
context.message = commit->buffer;
if (output_enc) {
char *enc = get_header(commit, "encoding");
if (strcmp(enc ? enc : utf8, output_enc))
if (strcmp(enc ? enc : utf8, output_enc)) {
context.message = logmsg_reencode(commit, output_enc);
if (!context.message)
context.message = commit->buffer;
}
free(enc);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册