git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 6/9] doc: notes: clearly state that --stripspace is the default

From
Kkristofferhaugsbakk@fastmail.com <kristofferhaugsbakk@fastmail.com>
Date
May 23, 2025, 19:29 UTC
Message-ID
<be89c3349d24e47a38f04538d3d1e3730dfc37a9.1748028010.git.code@khaugsbakk.name>
In-Reply-To
<cover.1748028010.git.code@khaugsbakk.name>
From: Kristoffer Haugsbakk <code@khaugsbakk.name>

Clearly state when which of the regular and negated form of the option take effect.[1]

[1]: https://lore.kernel.org/git/xmqqcyct1mtq.fsf@gitster.g/
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Notes (series):
    v2:
    • New
    • The `--` are to prevent the new paragraph from becoming a continuation
      of the last bullet point
    • Junio pointed out that I didn’t go over the part about checking
      which variant (regular or negation) are the default.  See the link:
    
      https://lore.kernel.org/git/xmqqcyct1mtq.fsf@gitster.g/
    
      I decided to do this on this series.
    
      Link: https://lore.kernel.org/git/xmqqfrgzhzbp.fsf@gitster.g/
    • The last part of the paragraph is based on the commit message of
      c4e2aa7d45f (notes.c: introduce "--[no-]stripspace" option,
      2023-05-27).
    
      See the review on the patch:
    
         https://lore.kernel.org/git/xmqq4jp326oj.fsf@gitster.g/
    
      There was concern about the order of options:
    
          >     ... One more thing need to note is "the order of
          >     the options matter", [...]
    
          This sounds more like a design/implementation mistake that we may
          want to fix.
    
      This new part is supposed to address that.
 Documentation/git-notes.adoc | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/Documentation/git-notes.adoc b/Documentation/git-notes.adoc
index 383e8bca685..bad83116329 100644
--- a/Documentation/git-notes.adoc
+++ b/Documentation/git-notes.adoc
@@ -179,10 +179,18 @@ OPTIONS
 	Clean up whitespace. Specifically (see
 	linkgit:git-stripspace[1]):
 +
+--
 - remove trailing whitespace from all lines
 - collapse multiple consecutive empty lines into one empty line
 - remove empty lines from the beginning and end of the input
 - add a missing `\n` to the last line if necessary.
+--
++
+`--stripspace` is the default except for
+`-C`/`--reuse-message`. However, keep in mind that this depends on the
+order of similar options. For example, for `-C <object> -m<message>`,
+`--stripspace` will be used because the default for `-m` overrides the
+previous `-C`.
 
 `--ref <ref>`::
 	Manipulate the notes tree in _<ref>_.  This overrides
-- 
2.49.0.780.g892193c3f50
Previous: kristofferhaugsbakk@fastmail.comNext: Junio C Hamano
Message 28 of 44 in “doc: --stdin on notes and core.commentChar mentions”
  1. 0/6 doc: --stdin on notes and core.commentChar mentionskristofferhaugsbakk@fastmail.com, May 20, 2025
  2. 1/6 doc: stripspace: mention where the default comes fromkristofferhaugsbakk@fastmail.com, May 20, 2025
  3. Junio C HamanoMay 20, 2025
  4. Kristoffer HaugsbakkMay 21, 2025
  5. 2/6 doc: config: mention core.commentChar on commit.cleanupkristofferhaugsbakk@fastmail.com, May 20, 2025
  6. 3/6 doc: notes: split out options with negationskristofferhaugsbakk@fastmail.com, May 20, 2025
  7. Junio C HamanoMay 20, 2025
  8. Junio C HamanoMay 21, 2025
  9. Kristoffer HaugsbakkMay 21, 2025
  10. Junio C HamanoMay 21, 2025
  11. Kristoffer HaugsbakkMay 21, 2025
  12. 4/6 doc: notes: mention comment character configurationkristofferhaugsbakk@fastmail.com, May 20, 2025
  13. Junio C HamanoMay 20, 2025
  14. 5/6 doc: notes: point out copy --stdin use with argvkristofferhaugsbakk@fastmail.com, May 20, 2025
  15. Junio C HamanoMay 20, 2025
  16. 6/6 doc: notes: treat --stdin equally between copy/removekristofferhaugsbakk@fastmail.com, May 20, 2025
  17. Junio C HamanoMay 20, 2025
  18. Kristoffer HaugsbakkMay 21, 2025
  19. D. Ben KnobleMay 21, 2025
  20. Kristoffer HaugsbakkMay 21, 2025
  21. Junio C HamanoMay 21, 2025
  22. 0/9 doc: --stdin on notes and core.commentChar mentionskristofferhaugsbakk@fastmail.com, May 23, 2025
  23. 1/9 doc: stripspace: mention where the default comes fromkristofferhaugsbakk@fastmail.com, May 23, 2025
  24. 2/9 doc: config: mention core.commentChar on commit.cleanupkristofferhaugsbakk@fastmail.com, May 23, 2025
  25. 3/9 doc: notes: split out options with negated formskristofferhaugsbakk@fastmail.com, May 23, 2025
  26. 4/9 doc: notes: rework --[no-]stripspacekristofferhaugsbakk@fastmail.com, May 23, 2025
  27. 5/9 doc: notes: remove stripspace discussion from other optionskristofferhaugsbakk@fastmail.com, May 23, 2025
  28. 6/9 doc: notes: clearly state that --stripspace is the defaultkristofferhaugsbakk@fastmail.com, May 23, 2025
  29. Junio C HamanoMay 23, 2025
  30. 7/9 doc: notes: point out copy --stdin use with argvkristofferhaugsbakk@fastmail.com, May 23, 2025
  31. 8/9 doc: notes: treat --stdin equally between copy/removekristofferhaugsbakk@fastmail.com, May 23, 2025
  32. Junio C HamanoMay 23, 2025
  33. 9/9 doc: notes: use stuck form throughoutkristofferhaugsbakk@fastmail.com, May 23, 2025
  34. 0/9 doc: --stdin on notes and core.commentChar mentionskristofferhaugsbakk@fastmail.com, May 27, 2025
  35. 1/9 doc: stripspace: mention where the default comes fromkristofferhaugsbakk@fastmail.com, May 27, 2025
  36. 2/9 doc: config: mention core.commentChar on commit.cleanupkristofferhaugsbakk@fastmail.com, May 27, 2025
  37. 3/9 doc: notes: split out options with negated formskristofferhaugsbakk@fastmail.com, May 27, 2025
  38. 4/9 doc: notes: rework --[no-]stripspacekristofferhaugsbakk@fastmail.com, May 27, 2025
  39. 5/9 doc: notes: remove stripspace discussion from other optionskristofferhaugsbakk@fastmail.com, May 27, 2025
  40. 6/9 doc: notes: clearly state that --stripspace is the defaultkristofferhaugsbakk@fastmail.com, May 27, 2025
  41. 7/9 doc: notes: point out copy --stdin use with argvkristofferhaugsbakk@fastmail.com, May 27, 2025
  42. 8/9 doc: notes: treat --stdin equally between copy/removekristofferhaugsbakk@fastmail.com, May 27, 2025
  43. 9/9 doc: notes: use stuck form throughoutkristofferhaugsbakk@fastmail.com, May 27, 2025
  44. Junio C HamanoMay 27, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.