@matheusbsbs / matheus-bagliano / commits / 26d94853f0
Fork 0

pretty-options.txt: --notes accepts a ref instead of treeish

Although `--notes=` accepts and handles a tree-ish just fine, it isn't a common use-case for users to pass in bare trees. By having "treeish", it makes it harder to click in users' minds that the argument here is the same type as the `notes.displayRef` configuration variable, for example. Change `treeish` to `ref` so that it will be easier for users to make this connection. Note that we don't completely lose the notion that `--notes=` can accept a tree-ish. In git-notes.txt, we have It is also permitted for a notes ref to point directly to a tree object, in which case the history of the notes can be read with `git log -p -g <refname>`. which means that a hardcore user who wants to take advantage of this obscure use-case will be able to infer the connection and not be completely left in the dark. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Nov 20, 2019 at 13:18 UTC 26d94853f083425872a27d525556cf8bcdfe67ba
1 file changed +4 -4
Documentation/pretty-options.txt
+4 -4
@@ -57,7 +57,7 @@ message by 4 spaces (i.e. 'medium', which is the default, 'full',
57 and 'fuller').
58
59 ifndef::git-rev-list[]
60 ---notes[=<treeish>]::
60 +--notes[=<ref>]::
61 Show the notes (see linkgit:git-notes[1]) that annotate the
62 commit, when showing the commit log message. This is the default
63 for `git log`, `git show` and `git whatchanged` commands when
@@ -68,8 +68,8 @@ By default, the notes shown are from the notes refs listed in the
68 `core.notesRef` and `notes.displayRef` variables (or corresponding
69 environment overrides). See linkgit:git-config[1] for more details.
70 +
71 -With an optional '<treeish>' argument, use the treeish to find the notes
72 -to display. The treeish can specify the full refname when it begins
71 +With an optional '<ref>' argument, use the ref to find the notes
72 +to display. The ref can specify the full refname when it begins
73 with `refs/notes/`; when it begins with `notes/`, `refs/` and otherwise
74 `refs/notes/` is prefixed to form a full name of the ref.
75 +
@@ -85,7 +85,7 @@ being displayed. Examples: "--notes=foo" will show only notes from
85 "--notes --notes=foo --no-notes --notes=bar" will only show notes
86 from "refs/notes/bar".
87
88 ---show-notes[=<treeish>]::
88 +--show-notes[=<ref>]::
89 --[no-]standard-notes::
90 These options are deprecated. Use the above --notes/--no-notes
91 options instead.