From: Adam Simpkins Date: Tue, 29 Apr 2008 08:33:00 +0000 (-0700) Subject: log: print log entry terminator even if the message is empty X-Git-Tag: v1.5.6-rc0~104 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9b58bfe8f4ea130a4518f6fbe9927fef78093f1b;p=git.git log: print log entry terminator even if the message is empty This eliminates a special case in the show_log() function, to help simplify the terminator semantics. Now show_log() always prints a newline after the log entry when use_terminator is set, even if the log message is empty. This change should only affect the --pretty=tformat output, since that was the only way to trigger this special case. Signed-off-by: Adam Simpkins Signed-off-by: Junio C Hamano --- diff --git a/log-tree.c b/log-tree.c index 4c7d7ef0c..d3fb0e520 100644 --- a/log-tree.c +++ b/log-tree.c @@ -307,11 +307,10 @@ void show_log(struct rev_info *opt) if (opt->show_log_size) printf("log size %i\n", (int)msgbuf.len); - if (msgbuf.len) { + if (msgbuf.len) fwrite(msgbuf.buf, sizeof(char), msgbuf.len, stdout); - if (opt->use_terminator) - putchar('\n'); - } + if (opt->use_terminator) + putchar('\n'); strbuf_release(&msgbuf); }