@@ -87,6 +87,9 @@ In `--stdin` mode, take lines in the format
8787 on standard input, and copy the notes from each _<from-object>_ to its
8888corresponding _<to-object>_ . (The optional _<rest>_ is ignored so that
8989the command can read the input given to the `post-rewrite` hook.)
90+ +
91+ `--stdin` cannot be combined with object names given on the command
92+ line.
9093
9194`append` ::
9295 Append new message(s) given by `-m` or `-F` options to an
@@ -124,6 +127,10 @@ When done, the user can either finalize the merge with
124127 giving zero or one object from the command line, this is
125128 equivalent to specifying an empty note message to
126129 the `edit` subcommand.
130+ +
131+ In `--stdin` mode, also remove the object names given on standard
132+ input. In other words, `--stdin` can be combined with object names from
133+ the command line.
127134
128135`prune` ::
129136 Remove all notes for non-existing/unreachable objects.
@@ -144,26 +151,18 @@ OPTIONS
144151 Use the given note message (instead of prompting).
145152 If multiple `-m` options are given, their values
146153 are concatenated as separate paragraphs.
147- Lines starting with `#` and empty lines other than a
148- single line between paragraphs will be stripped out.
149- If you wish to keep them verbatim, use `--no-stripspace` .
150154
151155`-F <file>` ::
152156`--file=<file>` ::
153157 Take the note message from the given file. Use `-` to
154158 read the note message from the standard input.
155- Lines starting with `#` and empty lines other than a
156- single line between paragraphs will be stripped out.
157- If you wish to keep them verbatim, use `--no-stripspace` .
158159
159160`-C <object>` ::
160161`--reuse-message=<object>` ::
161162 Take the given blob object (for example, another note) as the
162163 note message. (Use `git notes copy <object>` instead to
163- copy notes between objects.). By default, message will be
164- copied verbatim, but if you wish to strip out the lines
165- starting with `#` and empty lines other than a single line
166- between paragraphs, use with `--stripspace` option.
164+ copy notes between objects.) Implies `--no-stripspace` since
165+ the default behavior is to copy the message verbatim.
167166
168167`-c <object>` ::
169168`--reedit-message=<object>` ::
@@ -174,21 +173,34 @@ OPTIONS
174173 Allow an empty note object to be stored. The default behavior is
175174 to automatically remove empty notes.
176175
177- `--[no-]separator` ::
178176`--separator=<paragraph-break>` ::
177+ `--separator` ::
178+ `--no-separator` ::
179179 Specify a string used as a custom inter-paragraph separator
180180 (a newline is added at the end as needed). If `--no-separator` , no
181181 separators will be added between paragraphs. Defaults to a blank
182182 line.
183183
184- `--[no-]stripspace` ::
185- Strip leading and trailing whitespace from the note message.
186- Also strip out empty lines other than a single line between
187- paragraphs. Lines starting with `#` will be stripped out
188- in non-editor cases like `-m` , `-F` and `-C` , but not in
189- editor case like `git notes edit` , `-c` , etc.
190-
191- `--ref <ref>` ::
184+ `--stripspace` ::
185+ `--no-stripspace` ::
186+ Clean up whitespace. Specifically (see
187+ linkgit:git-stripspace[1]):
188+ +
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.
194+ --
195+ +
196+ `--stripspace` is the default except for
197+ `-C` /`--reuse-message` . However, keep in mind that this depends on the
198+ order of similar options. For example, for `-C <object> -m<message>` ,
199+ `--stripspace` will be used because the default for `-m` overrides the
200+ previous `-C` . This is a known limitation that may be fixed in the
201+ future.
202+
203+ `--ref=<ref>` ::
192204 Manipulate the notes tree in _<ref>_ . This overrides
193205 `GIT_NOTES_REF` and the `core.notesRef` configuration. The ref
194206 specifies the full refname when it begins with `refs/notes/` ; when it
@@ -200,9 +212,7 @@ OPTIONS
200212 object that does not have notes attached to it.
201213
202214`--stdin` ::
203- Also read the object names to remove notes from the standard
204- input (there is no reason you cannot combine this with object
205- names from the command line).
215+ Only valid for `remove` and `copy` . See the respective subcommands.
206216
207217`-n` ::
208218`--dry-run` ::
0 commit comments