Git development
 help / color / mirror / Atom feed
From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
To: "Phillip Wood" <phillip.wood@dunelm.org.uk>, git@vger.kernel.org
Cc: "Jeff King" <peff@peff.net>
Subject: Re: [PATCH] var: add GIT_COMMENT_STRING
Date: Wed, 25 Nov 2026 21:09:07 +0100	[thread overview]
Message-ID: <b9ab8baf-0b87-498b-a37c-64af0d06b9be@app.fastmail.com> (raw)
In-Reply-To: <608b25cc-6ec8-4f0a-8eeb-863ed44bd0db@gmail.com>

On Wed, Nov 25, 2026, at 17:19, Phillip Wood wrote:
> On 24/11/2026 15:02, Kristoffer Haugsbakk wrote:
>> On Tue, Nov 24, 2026, at 11:37, Phillip Wood wrote:
>[snip]
>
>>> diff --git a/Documentation/git-var.adoc b/Documentation/git-var.adoc
>>> index 5f240eb56e3..04aeccd7aa6 100644
>>> --- a/Documentation/git-var.adoc
>>> +++ b/Documentation/git-var.adoc
>>> @@ -130,6 +130,10 @@ endif::git-default-pager[]
>>>       The path to the global (per-user) configuration files, if any.
>>>       This variable can have multiple values.
>>>
>>> +`GIT_COMMENT_STRING`::
>>> +    The comment string used in template commit messages and rebase todo
>>> +    lists etc.
>>
>> This could also mention the config variables and git-config(1)?
>
> I had decided not do to that as the point of GIT_COMMENT_STRING is to be
> able to query the comment string without the user having to worry about
> the intricacies of the config setting or what the default value is.

I don’t agree about it being an intricacy. The concrete name links them
with no doubt even if they would have diverging description for example:

• String that marks lines to be discarded on save
• Marks the beginning of a comment. A comment is not part of the saved
  commit.

Granted that is completely invented...

> I guess saying "see `core.commentString` and `core.commentChar`in
> git-config(1)" doesn't really do any harm but I don't think users are
> going to get much additional useful information by reading the config
> documentation.

Yeah that is correct. The link isn’t worth the space.

> Perhaps saying "as set by `core.commentString`" would be
> more better as it does not promise the reader that the config
> documentation contains additional, useful, information?

Yeah, this sounds like the sweet spot.

>
> The documentation for GIT_PAGER, GIT_EDITOR and GIT_SEQUENCE_EDITOR
> mention the relevant config settings when describing how we determine
> which program to use, but the documentation for things like
> GIT_DEFAULT_BRANCH does do not.

After reading just a little, I much prefer the verbosity of `GIT_EDITOR`
compared to the terseness of `GIT_DEFAULT_BRANCH`.

>
> I have added a note to the documentation for `core.commentString` that
> the comment string can be queried with `git var GIT_COMMENT_STRING`

Sounds good.

  reply	other threads:[~2026-11-25 20:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 10:37 [PATCH] var: add GIT_COMMENT_STRING Phillip Wood
2026-11-24 15:02 ` Kristoffer Haugsbakk
2026-11-25 16:19   ` Phillip Wood
2026-11-25 20:09     ` Kristoffer Haugsbakk [this message]
2026-11-26 16:29       ` Phillip Wood
2026-11-24 20:24 ` Junio C Hamano
2026-11-26 16:25 ` [PATCH v2] " Phillip Wood
2026-11-26 20:56   ` Junio C Hamano
2026-11-27 16:42     ` Phillip Wood
2026-11-26 21:14   ` Kristoffer Haugsbakk
2026-11-29 16:18 ` [PATCH v3] " Phillip Wood
2026-11-29 19:15   ` Junio C Hamano

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=b9ab8baf-0b87-498b-a37c-64af0d06b9be@app.fastmail.com \
    --to=kristofferhaugsbakk@fastmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=phillip.wood@dunelm.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox