threads / patch / 4972

patchAlways reset the color _before_ printing out the newline

Subject: [PATCH] Always reset the color _before_ printing out the newline

## tl;dr

2 messages between Jul 24, 2006 and Jul 24, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Johannes Schindelin· Jul 24, 2006, 12:41 UTC · lore

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(-)
Show changes to log-tree.c +1 −1
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· Jul 24, 2006, 13:08 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Always reset the color _before_ printing out the newline

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

← back to recent threads