From: Alejandro Colomar <alx@kernel.org>
To: git@vger.kernel.org
Subject: Re: color.diff.<slot> for commit headers (Author, Date, ...)
Date: Sun, 8 Feb 2026 19:50:27 +0100 [thread overview]
Message-ID: <aYjauDayL_WIBXV2@devuan> (raw)
In-Reply-To: <aYjVlRqvafWeePvi@devuan>
[-- Attachment #1: Type: text/plain, Size: 1765 bytes --]
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>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2026-02-08 18:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-08 18:32 color.diff.<slot> for commit headers (Author, Date, ...) Alejandro Colomar
2026-02-08 18:50 ` Alejandro Colomar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYjauDayL_WIBXV2@devuan \
--to=alx@kernel.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.