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

Re: gitk fails to parse git log output in 1.5.3

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 2, 2007, 23:16 UTC
Message-ID
<7vzm04odze.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20070902223128.GA19198@falcon.digizenstudio.com>
Jing Xue <jingxue@digizenstudio.com> writes:
Show 7 quoted lines
> gitk shows an error "Can't parse git log output: {\x1b[33commit..." at
> startup and quits.
>
> Obviously it's because my git-log outputs in color mode. But the same
> happens (and git-log still outputs in colors) after I set color.pager=false. 
>
> What am I missing?
This will quickly turn into an FAQ.
Please see:
	http://thread.gmane.org/gmane.comp.version-control.git/57204

for details and a possible future plans. Making "diff.color = true" to always color was a mistake, and if you have such a configuration, it would break any script that reads from "git log". In the meantime, do not do "diff.color = true" (or "color.diff = true") in your configuration; say "auto" instead of "true", and/or apply this patch.

---
 gitk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gitk b/gitk
index 300fdce..9c21eff 100755
--- a/gitk
+++ b/gitk
@@ -93,6 +93,7 @@ proc start_rev_list {view} {
     }
     if {[catch {
 	set fd [open [concat | git log -z --pretty=raw $order --parents \
+			 --no-color \
 			 --boundary $viewargs($view) "--" $viewfiles($view)] r]
     } err]} {
 	error_popup "Error executing git rev-list: $err"
Previous: Jing XueNext: Jing Xue
Message 2 of 3 in “gitk fails to parse git log output in 1.5.3”
  1. Jing XueSep 2, 2007
  2. Junio C HamanoSep 2, 2007
  3. Jing XueSep 3, 2007

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.