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>
Johannes Schindelin committed
Oct 9, 2009 at 12:22 UTC
8b208f0213ed349ecb2ab8f7bb6c5072f8011a70
2 files changed
+5
Documentation/pretty-formats.txt
+1
@@ -123,6 +123,7 @@ The placeholders are:
123
- '%s': subject
124
- '%f': sanitized subject line, suitable for a filename
125
- '%b': body
126
+- '%N': commit notes
127
- '%Cred': switch color to red
128
- '%Cgreen': switch color to green
129
- '%Cblue': switch color to blue
pretty.c
+4
@@ -702,6 +702,10 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
702
case 'd':
703
format_decoration(sb, commit);
704
return 1;
705
+ case 'N':
706
+ get_commit_notes(commit, sb, git_log_output_encoding ?
707
+ git_log_output_encoding : git_commit_encoding, 0);
708
+ return 1;
709
}
710
711
/* For the rest we have to parse the commit header. */