# [PATCH] Always reset the color _before_ printing out the newline

2 messages from 2006-07-24 to 2006-07-24. Participants: Johannes Schindelin, Jeff King.
Thread: https://gitlist.dev/t/4972

## Johannes Schindelin, 2006-07-24 12:41

Subject: [PATCH] Always reset the color _before_ printing out the newline
Message-ID: <Pine.LNX.4.63.0607241440340.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607241440340.29667%40wbgn013.biozentrum.uni-wuerzburg.de

```

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>
---
 log-tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/log-tree.c b/log-tree.c
index 608f3ec..b67b8dd 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -144,9 +144,9 @@ void show_log(struct rev_info *opt, cons
 			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');
 	}
 
 	/*
-- 
1.4.2.rc1.g41e1-dirty

```

## Jeff King, 2006-07-24 13:08

Subject: Re: [PATCH] Always reset the color _before_ printing out the newline
Message-ID: <20060724130845.GA4468@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20060724130845.GA4468%40coredump.intra.peff.net
In-Reply-To: <Pine.LNX.4.63.0607241440340.29667@wbgn013.biozentrum.uni-wuerzburg.de>

```
On Mon, Jul 24, 2006 at 02:41:41PM +0200, Johannes Schindelin wrote:

> This patch brings the benefits of part of v1.4.1-rc2~37
> to the "commit" colorizing patch.

Oops, yes, I should have thought of that. Patch looks good to me.

-Peff

```
