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

[PATCH] docs: clarify meaning of core.commentString=auto

From
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Date
Mar 15, 2025, 14:09 UTC
Message-ID
<20250315140913.577404-1-oswald.buddenhagen@gmx.de>

I had to read the source to make sense of the feature, which is clearly not an acceptable state. Make the docu more specific and less misleading.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
---
Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
given the rather crippling limitations of this feature, does anyone
actually use it?
---
 Documentation/config/core.adoc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/config/core.adoc b/Documentation/config/core.adoc
index 8f6d8e7754..b470da72ba 100644
--- a/Documentation/config/core.adoc
+++ b/Documentation/config/core.adoc
@@ -526,8 +526,11 @@ core.commentString::
 	commented, and removes them after the editor returns
 	(default '#').
 +
-If set to "auto", `git-commit` would select a character that is not
-the beginning character of any line in existing commit messages.
+If set to "auto", `git-commit` will select the first character
+from the set "#;@!$%^&|:" that does not appear at the beginning
+of any line in the prepared commit message prior to editing.
+Note that this makes it impossible to include comments in the
+prepare-commit-msg hook's output or the commit message template.
 +
 Note that these two variables are aliases of each other, and in modern
 versions of Git you are free to use a string (e.g., `//` or `⁑⁕⁑`) with
-- 
2.49.0.416.g2f302f2ef0.dirty
Next: Junio C Hamano
Message 1 of 8 in “docs: clarify meaning of core.commentString=auto”
  1. docs: clarify meaning of core.commentString=autoOswald Buddenhagen, Mar 15, 2025
  2. Junio C HamanoMar 17, 2025
  3. Taylor BlauMar 17, 2025
  4. Oswald BuddenhagenMar 18, 2025
  5. Junio C HamanoMar 18, 2025
  6. Oswald BuddenhagenMar 19, 2025
  7. Phillip WoodMar 20, 2025
  8. Junio C HamanoMar 21, 2025

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.