Skip to content

Commit 5471b19

Browse files
LemmingAvalanchegitster
authored andcommitted
doc: notes: clearly state that --stripspace is the default
Clearly state when which of the regular and negated form of the option take effect.[1] Also mention the subtle behavior that occurs when you mix options like `-m` and `-C`, including a note that it might be fixed in the future. The topic was brought up on v8 of the `--separator` series.[2][3] [1]: https://lore.kernel.org/git/[email protected]/ [2]: https://lore.kernel.org/git/[email protected]/ † 3: v11 was the version that landed Helped-by: Junio C Hamano <[email protected]> Signed-off-by: Kristoffer Haugsbakk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 159c42a commit 5471b19

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Documentation/git-notes.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,19 @@ OPTIONS
179179
Clean up whitespace. Specifically (see
180180
linkgit:git-stripspace[1]):
181181
+
182+
--
182183
- remove trailing whitespace from all lines
183184
- collapse multiple consecutive empty lines into one empty line
184185
- remove empty lines from the beginning and end of the input
185186
- add a missing `\n` to the last line if necessary.
187+
--
188+
+
189+
`--stripspace` is the default except for
190+
`-C`/`--reuse-message`. However, keep in mind that this depends on the
191+
order of similar options. For example, for `-C <object> -m<message>`,
192+
`--stripspace` will be used because the default for `-m` overrides the
193+
previous `-C`. This is a known limitation that may be fixed in the
194+
future.
186195

187196
`--ref <ref>`::
188197
Manipulate the notes tree in _<ref>_. This overrides

0 commit comments

Comments
 (0)