X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=pretty.c;h=5661cba5952e2e68dd067a8afebe144bc1ca63af;hb=eb2fc8f899a58eedc87e7e8ea0fdecdc2ba9f430;hp=2e031e62fd98c02bfa6cc558fc49aef86c03ed09;hpb=375fe9262b61d924266656ea6615e25a1579c464;p=git.git diff --git a/pretty.c b/pretty.c index 2e031e62f..5661cba59 100644 --- a/pretty.c +++ b/pretty.c @@ -6,6 +6,7 @@ #include "string-list.h" #include "mailmap.h" #include "log-tree.h" +#include "notes.h" #include "color.h" #include "reflog-walk.h" @@ -773,6 +774,10 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder, return 2; } return 0; /* unknown %g placeholder */ + case 'N': + get_commit_notes(commit, sb, git_log_output_encoding ? + git_log_output_encoding : git_commit_encoding, 0); + return 1; } /* For the rest we have to parse the commit header. */ @@ -1050,5 +1055,10 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit, */ if (fmt == CMIT_FMT_EMAIL && sb->len <= beginning_of_body) strbuf_addch(sb, '\n'); + + if (fmt != CMIT_FMT_ONELINE) + get_commit_notes(commit, sb, encoding, + NOTES_SHOW_HEADER | NOTES_INDENT); + free(reencoded); }