Skip to content

Commit ab18b2c

Browse files
jherlandgitster
authored andcommitted
log/pretty-options: Document --[no-]notes and deprecate old notes options
Document the behavior or the new --notes, --notes=<ref> and --no-notes options, and list --show-notes[=<ref>] and --[no-]standard-notes options as deprecated. Signed-off-by: Johan Herland <johan@herland.net> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 92e0d42 commit ab18b2c

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

Documentation/git-log.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ May be an unabbreviated ref name or a glob and may be specified
178178
multiple times. A warning will be issued for refs that do not exist,
179179
but a glob that does not match any refs is silently ignored.
180180
+
181-
This setting can be disabled by the `--no-standard-notes` option,
181+
This setting can be disabled by the `--no-notes` option,
182182
overridden by the 'GIT_NOTES_DISPLAY_REF' environment variable,
183-
and supplemented by the `--show-notes` option.
183+
and overridden by the `--notes=<ref>` option.
184184

185185
GIT
186186
---

Documentation/pretty-options.txt

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,34 @@ people using 80-column terminals.
3030
preferred by the user. For non plumbing commands this
3131
defaults to UTF-8.
3232

33-
--no-notes::
34-
--show-notes[=<ref>]::
33+
--notes[=<ref>]::
3534
Show the notes (see linkgit:git-notes[1]) that annotate the
3635
commit, when showing the commit log message. This is the default
3736
for `git log`, `git show` and `git whatchanged` commands when
38-
there is no `--pretty`, `--format` nor `--oneline` option is
39-
given on the command line.
37+
there is no `--pretty`, `--format` nor `--oneline` option given
38+
on the command line.
39+
+
40+
By default, the notes shown are from the notes refs listed in the
41+
'core.notesRef' and 'notes.displayRef' variables (or corresponding
42+
environment overrides). See linkgit:git-config[1] for more details.
43+
+
44+
With an optional '<ref>' argument, show this notes ref instead of the
45+
default notes ref(s). The ref is taken to be in `refs/notes/` if it
46+
is not qualified.
4047
+
41-
With an optional argument, add this ref to the list of notes. The ref
42-
is taken to be in `refs/notes/` if it is not qualified.
48+
Multiple --notes options can be combined to control which notes are
49+
being displayed. Examples: "--notes=foo" will show only notes from
50+
"refs/notes/foo"; "--notes=foo --notes" will show both notes from
51+
"refs/notes/foo" and from the default notes ref(s).
4352

53+
--no-notes::
54+
Do not show notes. This negates the above `--notes` option, by
55+
resetting the list of notes refs from which notes are shown.
56+
Options are parsed in the order given on the command line, so e.g.
57+
"--notes --notes=foo --no-notes --notes=bar" will only show notes
58+
from "refs/notes/bar".
59+
60+
--show-notes[=<ref>]::
4461
--[no-]standard-notes::
45-
Enable or disable populating the notes ref list from the
46-
'core.notesRef' and 'notes.displayRef' variables (or
47-
corresponding environment overrides). Enabled by default.
48-
See linkgit:git-config[1].
62+
These options are deprecated. Use the above --notes/--no-notes
63+
options instead.

0 commit comments

Comments
 (0)