Subject: Re: Clarify the meaning of "character" in the documentation

From: Junio C Hamano <[email-masked]>
Date: Tue, 05 Mar 2024 09:37:30 -0800

Kristoffer Haugsbakk <[email-masked]> writes:

>> I personally do not see a reason, however, why we need to be limited
>> to a single byte, though.  If a patch cleanly implements to allow us
>> to use any one-or-more-byte sequence as core.commentChar, I do not
>> offhand see a good reason to reject it---it would be fully backward
>> compatible and allows you to use a UTF-8 charcter outside ASCII, as
>> well as "//" and the like.
>
> Allow one codepoint or a string?

I said "any one-or-more-byte sequence" and I meant it.  It does not
even have to be a full and complete UTF-8 character.  As long as we
correctly prefix the sequence and strip it from the front, I do not
care if the user chooses to use a broken half-character ;-).

> Maybe introduce `core.commentString` and make it a synonym for
> `core.commentChar`?

Yes, if we were to do so.  As I already said, this is not my itch,
but such a synonym would be part of the migration plan if somebody
seriously designs this as a new feature.

> diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt
> index 0e8c2832bf9..2d4bbdb25fa 100644
> --- a/Documentation/config/core.txt
> +++ b/Documentation/config/core.txt
> @@ -521,7 +521,7 @@ core.editor::
>  
>  core.commentChar::
>  	Commands such as `commit` and `tag` that let you edit
> -	messages consider a line that begins with this character
> +	messages consider a line that begins with this ASCII character
>  	commented, and removes them after the editor returns
>  	(default '#').
>  +

Looks sensible.  Thanks.  Will queue.