Skip to content

Commit c2d174d

Browse files
committed
Merge branch 'kh/notes-doc-fixes' into seen
"git notes --help" documentation updates. Comments? * kh/notes-doc-fixes: doc: notes: treat --stdin equally between copy/remove doc: notes: point out copy --stdin use with argv doc: notes: mention comment character configuration doc: notes: split out options with negations doc: config: mention core.commentChar on commit.cleanup doc: stripspace: mention where the default comes from
2 parents 0d2cd6a + 62b32e6 commit c2d174d

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

Documentation/config/commit.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ endif::git-commit[]
88
This setting overrides the default of the `--cleanup` option in
99
`git commit`. {see-git-commit} Changing the default can be useful
1010
when you always want to keep lines that begin
11-
with the comment character `#` in your log message, in which case you
11+
with the comment character (`core.commentChar`, default `#`)
12+
in your log message, in which case you
1213
would do `git config commit.cleanup whitespace` (note that you will
13-
have to remove the help lines that begin with `#` in the commit log
14-
template yourself, if you do this).
14+
have to remove the help lines that begin with the comment character
15+
in the commit log template yourself, if you do this).
1516

1617
`commit.gpgSign`::
1718
A boolean to specify whether all commits should be GPG signed.

Documentation/git-notes.adoc

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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
8888
corresponding _<to-object>_. (The optional _<rest>_ is ignored so that
8989
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.
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.
@@ -174,19 +181,24 @@ OPTIONS
174181
Allow an empty note object to be stored. The default behavior is
175182
to automatically remove empty notes.
176183

177-
`--[no-]separator`::
178184
`--separator=<paragraph-break>`::
185+
`--separator`::
186+
`--no-separator`::
179187
Specify a string used as a custom inter-paragraph separator
180188
(a newline is added at the end as needed). If `--no-separator`, no
181189
separators will be added between paragraphs. Defaults to a blank
182190
line.
183191

184-
`--[no-]stripspace`::
192+
`--stripspace`::
193+
`--no-stripspace`::
185194
Strip leading and trailing whitespace from the note message.
186195
Also strip out empty lines other than a single line between
187-
paragraphs. Lines starting with `#` will be stripped out
196+
paragraphs. Lines starting with the comment character
197+
(default `#`) will be stripped out
188198
in non-editor cases like `-m`, `-F` and `-C`, but not in
189199
editor case like `git notes edit`, `-c`, etc.
200+
+
201+
See `core.commentChar` in linkgit:git-config[1].
190202

191203
`--ref <ref>`::
192204
Manipulate the notes tree in _<ref>_. This overrides
@@ -200,9 +212,9 @@ 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+
For `remove` and `copy`. See the respective subcommands. This
216+
option can be combined with object names given via the command
217+
line for `remove`. However, this is not the case for `copy`.
206218

207219
`-n`::
208220
`--dry-run`::

Documentation/git-stripspace.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ OPTIONS
3737
-------
3838
-s::
3939
--strip-comments::
40-
Skip and remove all lines starting with a comment character (default '#').
40+
Skip and remove all lines starting with a comment character (default `#`).
41+
See `core.commentChar` in linkgit:git-config[1].
4142

4243
-c::
4344
--comment-lines::

0 commit comments

Comments
 (0)