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

color.diff.<slot> for commit headers (Author, Date, ...)

From
ACAlejandro Colomar <alx@kernel.org>
Date
Feb 8, 2026, 18:32 UTC
Message-ID
<aYjVlRqvafWeePvi@devuan>
Hi!
According to git-config(1):
     color.diff.<slot>
         Use customized color for diff colorization.  <slot> specifies
         which part of the patch to use the specified color, and is one
         of context (context text - plain is a historical synonym),
         meta (metainformation), frag (hunk header), func (function in
         hunk header), old (removed lines), new (added lines), commit
         (commit headers), whitespace (highlighting whitespace errors),
         oldMoved (deleted lines), newMoved (added lines),
         oldMovedDimmed, oldMovedAlternative,
         oldMovedAlternativeDimmed, newMovedDimmed, newMovedAlternative
         newMovedAlternativeDimmed (See the <mode> setting of
         --color-moved in git‐diff(1) for details), contextDimmed,
         oldDimmed, newDimmed, contextBold, oldBold, and newBold (see
         git‐range‐diff(1) for details).

color.diff.commit (commit headers) would seem to be the slot for coloring Author, Date, etc. However, that colors the commit hash exclusively.

The documentation should be updated to reflect reality.  Maybe
	s/headers/hash/

Also, I'm interested in coloring the actual header fields; that is Author, Date, etc. I think a good name for that slot could be 'header'. Would you mind adding that?

Have a lovely day! Alex

-- 
<https://www.alejandro-colomar.es>
Next: Alejandro Colomar
Message 1 of 2 in “color.diff.<slot> for commit headers (Author, Date, ...)”
  1. Alejandro ColomarFeb 8, 2026
  2. Alejandro ColomarFeb 8, 2026

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.