From: Johan Herland <johan@herland.net>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Michael J Gruber <git@drmicha.warpmail.net>
Subject: [PATCH 7/6] log/pretty-options: Document --[no-]notes and deprecate old notes options
Date: Wed, 30 Mar 2011 02:57:19 +0200 [thread overview]
Message-ID: <201103300257.19921.johan@herland.net> (raw)
In-Reply-To: <20110330002206.GB1161@sigill.intra.peff.net>
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>
---
On Wednesday 30 March 2011, Jeff King wrote:
> On Wed, Mar 30, 2011 at 12:18:55AM +0200, Johan Herland wrote:
> > And here's some documentation to go on top.
> [...]
> This example is wrong. "--notes=foo" will show _only_ foo. A few
> examples:
>
> --notes=foo ;# only foo
> --notes --notes=foo ;# foo and default
> --notes=foo --notes=bar --notes --no-notes --notes=foo ;# only foo
>
> Make sense?
Yeah, I really screwed that up. Hope this version is better. :)
...Johan
Documentation/git-log.txt | 4 ++--
Documentation/pretty-options.txt | 35 +++++++++++++++++++++++++----------
2 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index ff41784..ab3757b 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -177,9 +177,9 @@ May be an unabbreviated ref name or a glob and may be specified
multiple times. A warning will be issued for refs that do not exist,
but a glob that does not match any refs is silently ignored.
+
-This setting can be disabled by the `--no-standard-notes` option,
+This setting can be disabled by the `--no-notes` option,
overridden by the 'GIT_NOTES_DISPLAY_REF' environment variable,
-and supplemented by the `--show-notes` option.
+and overridden by the `--notes=<ref>` option.
Author
------
diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt
index 50923e2..d5c9772 100644
--- a/Documentation/pretty-options.txt
+++ b/Documentation/pretty-options.txt
@@ -30,19 +30,34 @@ people using 80-column terminals.
preferred by the user. For non plumbing commands this
defaults to UTF-8.
---no-notes::
---show-notes[=<ref>]::
+--notes[=<ref>]::
Show the notes (see linkgit:git-notes[1]) that annotate the
commit, when showing the commit log message. This is the default
for `git log`, `git show` and `git whatchanged` commands when
- there is no `--pretty`, `--format` nor `--oneline` option is
- given on the command line.
+ there is no `--pretty`, `--format` nor `--oneline` option given
+ on the command line.
++
+By default, the notes shown are from the notes refs listed in the
+'core.notesRef' and 'notes.displayRef' variables (or corresponding
+environment overrides). See linkgit:git-config[1] for more details.
++
+With an optional '<ref>' argument, show this notes ref instead of the
+default notes ref(s). The ref is taken to be in `refs/notes/` if it
+is not qualified.
+
-With an optional argument, add this ref to the list of notes. The ref
-is taken to be in `refs/notes/` if it is not qualified.
+Multiple --notes options can be combined to control which notes are
+being displayed. Examples: "--notes=foo" will show only notes from
+"refs/notes/foo"; "--notes=foo --notes" will show both notes from
+"refs/notes/foo" and from the default notes ref(s).
+--no-notes::
+ Do not show notes. This negates the above `--notes` option, by
+ resetting the list of notes refs from which notes are shown.
+ Options are parsed in the order given on the command line, so e.g.
+ "--notes --notes=foo --no-notes --notes=bar" will only show notes
+ from "refs/notes/bar".
+
+--show-notes[=<ref>]::
--[no-]standard-notes::
- Enable or disable populating the notes ref list from the
- 'core.notesRef' and 'notes.displayRef' variables (or
- corresponding environment overrides). Enabled by default.
- See linkgit:git-config[1].
+ These options are deprecated. Use the above --notes/--no-notes
+ options instead.
--
1.7.4
next prev parent reply other threads:[~2011-03-30 0:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 10:05 [PATCH] revision.c: introduce --notes-ref= to use one notes ref only Michael J Gruber
2011-03-29 12:39 ` Johan Herland
2011-03-29 14:33 ` Jeff King
2011-03-29 15:16 ` Michael J Gruber
2011-03-29 18:32 ` Junio C Hamano
2011-03-29 20:53 ` Jeff King
2011-03-29 20:55 ` [PATCH 1/6] notes: make expand_notes_ref globally accessible Jeff King
2011-03-29 20:56 ` [PATCH 2/6] revision.c: refactor notes ref expansion Jeff King
2011-03-29 20:56 ` [PATCH 3/6] notes: refactor display notes extra refs field Jeff King
2011-03-29 20:57 ` [PATCH 4/6] notes: refactor display notes default handling Jeff King
2011-03-29 22:02 ` Junio C Hamano
2011-03-29 20:57 ` [PATCH 5/6] revision.c: support --notes command-line option Jeff King
2011-03-29 20:59 ` [PATCH 6/6] revision.c: make --no-notes reset --notes list Jeff King
2011-03-29 22:04 ` Junio C Hamano
2011-03-29 21:44 ` [PATCH] revision.c: introduce --notes-ref= to use one notes ref only Johan Herland
2011-03-29 22:18 ` [PATCH 7/6] log/pretty-options: Document --[no-]notes and deprecate old notes options Johan Herland
2011-03-30 0:22 ` Jeff King
2011-03-30 0:57 ` Johan Herland [this message]
2011-03-30 3:32 ` Jeff King
2011-03-29 14:35 ` [PATCH] revision.c: introduce --notes-ref= to use one notes ref only Jeff King
2011-03-29 19:01 ` Jeff King
2011-03-29 19:48 ` Michael J Gruber
2011-03-29 20:23 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201103300257.19921.johan@herland.net \
--to=johan@herland.net \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).