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

text in --stat is colored like color.diff.plain

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Apr 22, 2009, 21:13 UTC
Message-ID
<200904222313.50081.markus.heidelberg@web.de>

I noticed, that the filenames and the text "X files changed, Y insertions(+), Z deletions(-)" in the --stat output ended with an ESC[m, although they were not colored. Further investigation showed, that these parts of the output indeed can use colors from color.diff.plain.

Is this intention? Commit 785f743 (diff --stat: color output.,
2006-09-26) introduced it, but only mentioned colored output of the
+++++++---- diffstat graph in the commit message. color.diff.plain is
documented for coloring context text and I don't think it looks good
either as it is now, nor is this really "context text".
Note: --shortstat and --summary don't use colors like --stat. Or is this
really intention and I don't see the reason for it?

If not, should we remove the colors for --stat? After that maybe we could do some more color.diff.old/new coloring for "Y insertions(+)", "Z deletions(-)", "create mode ...", "delete mode ..."

Markus
Next: Markus Heidelberg
Message 1 of 6 in “text in --stat is colored like color.diff.plain”
  1. Markus HeidelbergApr 22, 2009
  2. 1/2 diff: do not color --stat output like patch contextMarkus Heidelberg, Apr 24, 2009
  3. 2/2 diff: color statistics (stat, shortstat, numstat)Markus Heidelberg, Apr 24, 2009
  4. Jeff KingApr 24, 2009
  5. Junio C HamanoApr 24, 2009
  6. Markus HeidelbergApr 25, 2009

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.