summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-18 02:02:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-10-18 05:42:40 (GMT)
commit5a664cf2c76ed83166f5f3ce7385e3cb058e8834 (patch)
treed6586d0246e652c4c7909b8bbe7e196d99a40bc9 /pretty.c
parentddf333f66cb8b8647a40e5d39731eaf63ee9fd44 (diff)
downloadgit-5a664cf2c76ed83166f5f3ce7385e3cb058e8834.zip
git-5a664cf2c76ed83166f5f3ce7385e3cb058e8834.tar.gz
git-5a664cf2c76ed83166f5f3ce7385e3cb058e8834.tar.bz2
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>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/pretty.c b/pretty.c
index a53eb53..1925e9c 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1417,9 +1417,6 @@ void pretty_print_commit(const struct pretty_print_context *pp,
if (pp->fmt == CMIT_FMT_EMAIL && sb->len <= beginning_of_body)
strbuf_addch(sb, '\n');
- if (pp->notes_message && *pp->notes_message)
- strbuf_addstr(sb, pp->notes_message);
-
free(reencoded);
}