pretty_print_commit(): do not append notes message
The only case pretty_print_commit() appends notes message to the log message taken from the commit is when show_log() calls it with the notes_message field set, and the output format is not the userformat (i.e. when substituting "%N"). No other users of this function sets this field in the pretty_print_context, as can be easily verified in the previous step. Hoist the code to append the notes message to the caller. Up to this point, no functionality change is intended. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ddf333f66c
commit
5a664cf2c7
@ -672,6 +672,9 @@ void show_log(struct rev_info *opt)
|
||||
ctx.reflog_info = opt->reflog_info;
|
||||
ctx.fmt = opt->commit_format;
|
||||
pretty_print_commit(&ctx, commit, &msgbuf);
|
||||
if ((ctx.fmt != CMIT_FMT_USERFORMAT) &&
|
||||
ctx.notes_message && *ctx.notes_message)
|
||||
strbuf_addstr(&msgbuf, ctx.notes_message);
|
||||
|
||||
if (opt->add_signoff)
|
||||
append_signoff(&msgbuf, opt->add_signoff);
|
||||
|
Loading…
Reference in New Issue
Block a user