summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-17 21:41:54 -0700
committerJunio C Hamano <gitster@pobox.com>2012-10-17 22:42:40 -0700
commit76141e2e6280101362c3c5ddb22699b6f0458100 (patch)
tree7d780fe891cc5680a5befaed7d16b20a67a14dc7 /pretty.c
parente297cf5aff0264c16b6c325c0beab71bc04cd496 (diff)
downloadgit-76141e2e6280101362c3c5ddb22699b6f0458100.tar.gz
format_note(): simplify API
We either stuff the notes message without modification for %N userformat, or format it for human consumption. Using two bits is an overkill that does not benefit anybody. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pretty.c b/pretty.c
index c311a68fc4..735cf0fec3 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1035,7 +1035,7 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
case 'N':
if (c->pretty_ctx->show_notes) {
format_display_notes(commit->object.sha1, sb,
- get_log_output_encoding(), 0);
+ get_log_output_encoding(), 1);
return 1;
}
return 0;
@@ -1419,8 +1419,7 @@ void pretty_print_commit(const struct pretty_print_context *pp,
strbuf_addch(sb, '\n');
if (pp->show_notes)
- format_display_notes(commit->object.sha1, sb, encoding,
- NOTES_SHOW_HEADER | NOTES_INDENT);
+ format_display_notes(commit->object.sha1, sb, encoding, 0);
free(reencoded);
}