Merge branch 'jc/custom-comment-char'
Allow a configuration variable core.commentchar to customize the character used to comment out the hint lines in the edited text from the default '#'. * jc/custom-comment-char: Allow custom "comment char"
This commit is contained in:
@ -534,6 +534,12 @@ core.editor::
|
||||
variable when it is set, and the environment variable
|
||||
`GIT_EDITOR` is not set. See linkgit:git-var[1].
|
||||
|
||||
core.commentchar::
|
||||
Commands such as `commit` and `tag` that lets you edit
|
||||
messages consider a line that begins with this character
|
||||
commented, and removes them after the editor returns
|
||||
(default '#').
|
||||
|
||||
sequence.editor::
|
||||
Text editor used by `git rebase -i` for editing the rebase insn file.
|
||||
The value is meant to be interpreted by the shell when it is used.
|
||||
|
@ -35,7 +35,13 @@ OPTIONS
|
||||
-------
|
||||
-s::
|
||||
--strip-comments::
|
||||
Skip and remove all lines starting with '#'.
|
||||
Skip and remove all lines starting with comment character (default '#').
|
||||
|
||||
-c::
|
||||
--comment-lines::
|
||||
Prepend comment character and blank to each line. Lines will automatically
|
||||
be terminated with a newline. On empty lines, only the comment character
|
||||
will be prepended.
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
@ -156,6 +156,11 @@ then they will free() it.
|
||||
Remove the bytes between `pos..pos+len` and replace it with the given
|
||||
data.
|
||||
|
||||
`strbuf_add_commented_lines`::
|
||||
|
||||
Add a NUL-terminated string to the buffer. Each line will be prepended
|
||||
by a comment character and a blank.
|
||||
|
||||
`strbuf_add`::
|
||||
|
||||
Add data of given length to the buffer.
|
||||
@ -229,6 +234,11 @@ which can be used by the programmer of the callback as she sees fit.
|
||||
|
||||
Add a formatted string to the buffer.
|
||||
|
||||
`strbuf_commented_addf`::
|
||||
|
||||
Add a formatted string prepended by a comment character and a
|
||||
blank to the buffer.
|
||||
|
||||
`strbuf_fread`::
|
||||
|
||||
Read a given size of data from a FILE* pointer to the buffer.
|
||||
|
Reference in New Issue
Block a user