git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] config: tell the user that we expect an ASCII character

From
Kristoffer Haugsbakk <code@khaugsbakk.name>
Date
Mar 27, 2023, 19:43 UTC
Message-ID
<20230327194344.12910-1-code@khaugsbakk.name>

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(-)
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;
 	}
 
-- 
2.40.0
Next: Junio C Hamano
Message 1 of 2 in “config: tell the user that we expect an ASCII character”
  1. config: tell the user that we expect an ASCII characterKristoffer Haugsbakk, Mar 27, 2023
  2. Junio C HamanoMar 27, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.