Code

git-log: do not output excess blank line between commits
authorJunio C Hamano <junkio@cox.net>
Thu, 13 Apr 2006 07:26:21 +0000 (00:26 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 13 Apr 2006 07:26:21 +0000 (00:26 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
git.c

diff --git a/git.c b/git.c
index 5cb0d32070bfdc067ac02c4a5186c3f2db3d5619..d6f17db919ed0bcafbde0d7e3fa825692c66e8a8 100644 (file)
--- a/git.c
+++ b/git.c
@@ -354,7 +354,7 @@ static int cmd_log(int argc, const char **argv, char **envp)
        prepare_revision_walk(&rev);
        setup_pager();
        while ((commit = get_revision(&rev)) != NULL) {
-               if (commit_format != CMIT_FMT_ONELINE && shown)
+               if (shown && do_diff && commit_format != CMIT_FMT_ONELINE)
                        putchar('\n');
                fputs(commit_prefix, stdout);
                if (abbrev_commit && abbrev)