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

2 messages from 2026-02-08 to 2026-02-08. Participants: Alejandro Colomar.
Thread: https://gitlist.dev/t/64951

## Alejandro Colomar, 2026-02-08 18:32

Subject: color.diff.<slot> for commit headers (Author, Date, ...)
Message-ID: <aYjVlRqvafWeePvi@devuan>
URL: https://gitlist.dev/e/aYjVlRqvafWeePvi%40devuan

```
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>

```

## Alejandro Colomar, 2026-02-08 18:50

Subject: Re: color.diff.<slot> for commit headers (Author, Date, ...)
Message-ID: <aYjauDayL_WIBXV2@devuan>
URL: https://gitlist.dev/e/aYjauDayL_WIBXV2%40devuan
In-Reply-To: <aYjVlRqvafWeePvi@devuan>

```
On 2026-02-08T19:32:40+0100, Alejandro Colomar wrote:
> 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?

Another thing I'd like to be able to color independently is the subject
(the first line of the commit message).  'subject' would be a good name
for that slot.


Cheers,
Alex

> 
> 
> Have a lovely day!
> Alex
> 
> -- 
> <https://www.alejandro-colomar.es>



-- 
<https://www.alejandro-colomar.es>

```
