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/xmqqcyct1mtq.fsf@gitster.g/ [2]: https://lore.kernel.org/git/xmqq4jp326oj.fsf@gitster.g/ † 3: v11 was the version that landed Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kristoffer Haugsbakk committed
May 27, 2025 at 23:19 UTC
5471b190f80f2781c4414e347162656ab3b0c4ef
1 file changed
+9
Documentation/git-notes.adoc
+9
@@ -179,10 +179,19 @@ OPTIONS
179
Clean up whitespace. Specifically (see
180
linkgit:git-stripspace[1]):
181
+
182
+--
183
- remove trailing whitespace from all lines
184
- collapse multiple consecutive empty lines into one empty line
185
- remove empty lines from the beginning and end of the input
186
- 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.
195
196
`--ref <ref>`::
197
Manipulate the notes tree in _<ref>_. This overrides