Always reset the color _before_ printing out the newline
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Mon, 24 Jul 2006 12:41:41 +0000 (14:41 +0200)
committerJunio C Hamano <junkio@cox.net>
Mon, 24 Jul 2006 17:49:11 +0000 (10:49 -0700)
This patch brings the benefits of part of v1.4.1-rc2~37
to the "commit" colorizing patch.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
log-tree.c

index b71cf9ba41b3311b47cbf75bf894f8aeca5ef078..3a6c84dab559cc0904ba6c339fdb97edba7e7983 100644 (file)
@@ -139,9 +139,9 @@ void show_log(struct rev_info *opt, const char *sep)
                        printf(" (from %s)",
                               diff_unique_abbrev(parent->object.sha1,
                                                  abbrev_commit));
-               putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
                printf("%s",
                       diff_get_color(opt->diffopt.color_diff, DIFF_RESET));
+               putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
        }
 
        /*