Add '%N'-format for pretty-printing commit notes
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c56fcc89b9
commit
8b208f0213
@ -123,6 +123,7 @@ The placeholders are:
|
|||||||
- '%s': subject
|
- '%s': subject
|
||||||
- '%f': sanitized subject line, suitable for a filename
|
- '%f': sanitized subject line, suitable for a filename
|
||||||
- '%b': body
|
- '%b': body
|
||||||
|
- '%N': commit notes
|
||||||
- '%Cred': switch color to red
|
- '%Cred': switch color to red
|
||||||
- '%Cgreen': switch color to green
|
- '%Cgreen': switch color to green
|
||||||
- '%Cblue': switch color to blue
|
- '%Cblue': switch color to blue
|
||||||
|
4
pretty.c
4
pretty.c
@ -702,6 +702,10 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
|
|||||||
case 'd':
|
case 'd':
|
||||||
format_decoration(sb, commit);
|
format_decoration(sb, commit);
|
||||||
return 1;
|
return 1;
|
||||||
|
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. */
|
/* For the rest we have to parse the commit header. */
|
||||||
|
Reference in New Issue
Block a user