Thread (5 messages) 5 messages, 4 authors, 2024-03-27

Re: [PATCH v2 16/16] config: allow multi-byte core.commentChar

From: Kristoffer Haugsbakk <hidden>
Date: 2024-03-26 22:12:59

Possibly related (same subject, not in this thread)

On Tue, Mar 26, 2024, at 23:10, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
So anyway, adapting your original suggestion based on discussion in the
thread, maybe squash in (to the final patch):
diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt
index c86b8c8408..c5a8033df9 100644
--- a/Documentation/config/core.txt
+++ b/Documentation/config/core.txt
@@ -523,9 +523,8 @@ core.commentChar::
 	Commands such as `commit` and `tag` that let you edit
 	messages consider a line that begins with this character
 	commented, and removes them after the editor returns
-	(default '#'). Note that this option can take values larger than
-	a byte (whether a single multi-byte character, or you
-	could even go wild with a multi-character sequence).
+	(default '#'). Note that this variable can be a string like
+	`//` or `⁑⁕⁑`; it doesn't have to be a single ASCII character.
 +
 If set to "auto", `git-commit` would select a character that is not
 the beginning character of any line in existing commit messages.

That's assuming we don't want to go the commentString route, which would
require a bit more re-working of the patch. I'm also open to a more
clever or pretty multi-byte example if we have one. ;)
It has been 10 days since this discussion petered out.

My preference is to introduce core.commentString to avoid confusion
coming from an older Git using the first-byte of a multi-byte
string, or dying upon reading a configuration file meant for a newer
Git, and then let core.commentString override core.commentChar, but
I would prefer to see the discussion participants to raise their
opinions and reach a conclusion.

Thanks.
Sounds good to me.

-- 
Kristoffer Haugsbakk
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help