summaryrefslogtreecommitdiffstats
path: root/log-tree.c
diff options
context:
space:
mode:
authorAdam Simpkins <adam@adamsimpkins.net>2008-04-29 10:33:00 +0200
committerJunio C Hamano <gitster@pobox.com>2008-05-03 20:50:41 +0200
commit9b58bfe8f4ea130a4518f6fbe9927fef78093f1b (patch)
tree026fcba7c126e4d06b1a4c303ffeb86ead802a79 /log-tree.c
parentRemove dead code: show_log() sep argument and diff_options.msg_sep (diff)
downloadgit-9b58bfe8f4ea130a4518f6fbe9927fef78093f1b.tar.xz
git-9b58bfe8f4ea130a4518f6fbe9927fef78093f1b.zip
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 <adam@adamsimpkins.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r--log-tree.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/log-tree.c b/log-tree.c
index 4c7d7ef0c6..d3fb0e520c 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);
}