Skip to content

Commit 6521ca8

Browse files
LemmingAvalanchegitster
authored andcommitted
doc: notes: rework --[no-]stripspace
Document this option by copying the bullet list from git-stripspace(1). A bullet list is cleaner when there are this many points to consider. We also get a more standardized description of the multiple-blank-lines behavior. Compare the repeating (git-notes(1)): empty lines other than a single line between paragraphs With (git-stripspace(1)): multiple consecutive empty lines And: leading [...] whitespace With: empty lines from the beginning Leading whitespace in the form of spaces (indentation) are not removed. However, empty lines at the start of the message are removed. Note that we drop the mentions of comment line handling because they are wrong; this option does not control how lines which can be recognized as comment lines are handled. Only interactivity controls that: • Comment lines are stripped after editing interactively • Lines which could be recognized as comment lines are left alone when the message is given non-interactively So it is misleading to document the comment line behavior on this option. Further, the text is wrong: Lines starting with `#` will be stripped out in non-editor cases like `-m`, [...] Comment lines are still indirectly discussed on other options. We will deal with them in the next commit. Signed-off-by: Kristoffer Haugsbakk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 37dd51a commit 6521ca8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Documentation/git-notes.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,13 @@ OPTIONS
184184

185185
`--stripspace`::
186186
`--no-stripspace`::
187-
Strip leading and trailing whitespace from the note message.
188-
Also strip out empty lines other than a single line between
189-
paragraphs. Lines starting with `#` will be stripped out
190-
in non-editor cases like `-m`, `-F` and `-C`, but not in
191-
editor case like `git notes edit`, `-c`, etc.
187+
Clean up whitespace. Specifically (see
188+
linkgit:git-stripspace[1]):
189+
+
190+
- remove trailing whitespace from all lines
191+
- collapse multiple consecutive empty lines into one empty line
192+
- remove empty lines from the beginning and end of the input
193+
- add a missing `\n` to the last line if necessary.
192194

193195
`--ref <ref>`::
194196
Manipulate the notes tree in _<ref>_. This overrides

0 commit comments

Comments
 (0)