@@ -87,6 +87,9 @@ In `--stdin` mode, take lines in the format
87
87
on standard input, and copy the notes from each _<from-object>_ to its
88
88
corresponding _<to-object>_ . (The optional _<rest>_ is ignored so that
89
89
the 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.
90
93
91
94
`append` ::
92
95
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
124
127
giving zero or one object from the command line, this is
125
128
equivalent to specifying an empty note message to
126
129
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.
127
134
128
135
`prune` ::
129
136
Remove all notes for non-existing/unreachable objects.
@@ -144,26 +151,18 @@ OPTIONS
144
151
Use the given note message (instead of prompting).
145
152
If multiple `-m` options are given, their values
146
153
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` .
150
154
151
155
`-F <file>` ::
152
156
`--file=<file>` ::
153
157
Take the note message from the given file. Use `-` to
154
158
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` .
158
159
159
160
`-C <object>` ::
160
161
`--reuse-message=<object>` ::
161
162
Take the given blob object (for example, another note) as the
162
163
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.
167
166
168
167
`-c <object>` ::
169
168
`--reedit-message=<object>` ::
@@ -174,21 +173,34 @@ OPTIONS
174
173
Allow an empty note object to be stored. The default behavior is
175
174
to automatically remove empty notes.
176
175
177
- `--[no-]separator` ::
178
176
`--separator=<paragraph-break>` ::
177
+ `--separator` ::
178
+ `--no-separator` ::
179
179
Specify a string used as a custom inter-paragraph separator
180
180
(a newline is added at the end as needed). If `--no-separator` , no
181
181
separators will be added between paragraphs. Defaults to a blank
182
182
line.
183
183
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>` ::
192
204
Manipulate the notes tree in _<ref>_ . This overrides
193
205
`GIT_NOTES_REF` and the `core.notesRef` configuration. The ref
194
206
specifies the full refname when it begins with `refs/notes/` ; when it
@@ -200,9 +212,7 @@ OPTIONS
200
212
object that does not have notes attached to it.
201
213
202
214
`--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.
206
216
207
217
`-n` ::
208
218
`--dry-run` ::
0 commit comments