diff mbox series

config: tell the user that we expect an ASCII character

Message ID 20230327194344.12910-1-code@khaugsbakk.name (mailing list archive)
State Accepted
Commit d3b3419f8f287cd9d17be30e50937cbc7c4951ff
Headers show
Series config: tell the user that we expect an ASCII character | expand

Commit Message

Kristoffer Haugsbakk March 27, 2023, 7:43 p.m. UTC
Commit 50b54fd72a (config: be strict on core.commentChar, 2014-05-17)
notes that “multi-byte character encoding could also be misinterpreted”,
and indeed a multi-byte codepoint (non-ASCII) is not accepted as a valid
`core.commentChar`.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Junio C Hamano March 27, 2023, 8:09 p.m. UTC | #1
Kristoffer Haugsbakk <code@khaugsbakk.name> writes:

> Commit 50b54fd72a (config: be strict on core.commentChar, 2014-05-17)
> notes that “multi-byte character encoding could also be misinterpreted”,
> and indeed a multi-byte codepoint (non-ASCII) is not accepted as a valid
> `core.commentChar`.

Makes sense.  Will queue.  Thanks.
diff mbox series

Patch

diff --git a/config.c b/config.c
index 00090a32fc..ae68c0f736 100644
--- a/config.c
+++ b/config.c
@@ -1683,7 +1683,7 @@  static int git_default_core_config(const char *var, const char *value, void *cb)
 			comment_line_char = value[0];
 			auto_comment_line_char = 0;
 		} else
-			return error(_("core.commentChar should only be one character"));
+			return error(_("core.commentChar should only be one ASCII character"));
 		return 0;
 	}