git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 24, 2006, 12:41 UTC
Message-ID
<Pine.LNX.4.63.0607241440340.29667@wbgn013.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
Next: Jeff King
Message 1 of 2 in “Always reset the color _before_ printing out the newline”
  1. Always reset the color _before_ printing out the newlineJohannes Schindelin, Jul 24, 2006
  2. Jeff KingJul 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.