diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-04-05 17:49:49 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-05 17:49:49 (GMT) |
commit | dce1e0b6daaa872a3b88724d9aa1b087c95e8754 (patch) | |
tree | 9553fe603130f7aa2617854320ba23601887149b /Documentation | |
parent | 3256584c36f649abb2af58e7b190d3cf674ba56e (diff) | |
parent | 9ccf3e9b22b6843892319b189fd7aed37c451420 (diff) | |
download | git-dce1e0b6daaa872a3b88724d9aa1b087c95e8754.zip git-dce1e0b6daaa872a3b88724d9aa1b087c95e8754.tar.gz git-dce1e0b6daaa872a3b88724d9aa1b087c95e8754.tar.bz2 |
Merge branch 'jk/core-comment-string'
core.commentChar used to be limited to a single byte, but has been
updated to allow an arbitrary multi-byte sequence.
* jk/core-comment-string:
config: add core.commentString
config: allow multi-byte core.commentChar
environment: drop comment_line_char compatibility macro
wt-status: drop custom comment-char stringification
sequencer: handle multi-byte comment characters when writing todo list
find multi-byte comment chars in unterminated buffers
find multi-byte comment chars in NUL-terminated strings
prefer comment_line_str to comment_line_char for printing
strbuf: accept a comment string for strbuf_add_commented_lines()
strbuf: accept a comment string for strbuf_commented_addf()
strbuf: accept a comment string for strbuf_stripspace()
environment: store comment_line_char as a string
strbuf: avoid shadowing global comment_line_char name
commit: refactor base-case of adjust_comment_line_char()
strbuf: avoid static variables in strbuf_add_commented_lines()
strbuf: simplify comment-handling in add_lines() helper
config: forbid newline as core.commentChar
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config/core.txt | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt index 2d4bbdb..bbe869c 100644 --- a/Documentation/config/core.txt +++ b/Documentation/config/core.txt @@ -520,13 +520,28 @@ core.editor:: `GIT_EDITOR` is not set. See linkgit:git-var[1]. core.commentChar:: +core.commentString:: Commands such as `commit` and `tag` that let you edit - messages consider a line that begins with this ASCII character + messages consider a line that begins with this character 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. ++ +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 +`commentChar`. Versions of Git prior to v2.45.0 will ignore +`commentString` but will reject a value of `commentChar` that consists +of more than a single ASCII byte. If you plan to use your config with +older and newer versions of Git, you may want to specify both: ++ + [core] + # single character for older versions + commentChar = "#" + # string for newer versions (which will override commentChar + # because it comes later in the file) + commentString = "//" core.filesRefLockTimeout:: The length of time, in milliseconds, to retry when trying to |