git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: git@vger.kernel.org
Cc: Johan Herland <johan@herland.net>,
	Thomas Rast <trast@student.ethz.ch>, Jeff King <peff@peff.net>
Subject: [PATCH 4/8] Documentation/notes: simplify treatment of default notes ref
Date: Sat, 8 May 2010 22:23:58 -0500	[thread overview]
Message-ID: <20100509032358.GD7958@progeny.tock> (raw)
In-Reply-To: <20100509031357.GA7926@progeny.tock>

Separate the documentation of the semantics, command-line option,
configuration item, and environment variable for the default notes
ref.  The documentation is easier to digest in bite-sized pieces.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/git-notes.txt |   31 ++++++++++++++++++++-----------
 1 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index f561457..28ac862 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -23,6 +23,11 @@ DESCRIPTION
 This command allows you to add/remove notes to/from objects, without
 changing the objects themselves.
 
+By default, notes are saved to and read from `refs/notes/commits`, but
+this default can be overridden.  See the OPTIONS, CONFIGURATION, and
+ENVIRONMENT sections below.  If this ref does not exist, it will be
+quietly created when it is first needed to store a note.
+
 A typical use of notes is to extend a commit message without having
 to change the commit itself. Such commit notes can be shown by `git log`
 along with the original commit message. To discern these notes from the
@@ -30,8 +35,6 @@ message stored in the commit object, the notes are indented like the
 message, after an unindented line saying "Notes (<refname>):" (or
 "Notes:" for `refs/notes/commits`).
 
-This command always manipulates the notes specified in "core.notesRef"
-(see linkgit:git-config[1]), which can be overridden by GIT_NOTES_REF.
 To change which notes are shown by 'git-log', see the
 "notes.displayRef" configuration.
 
@@ -122,8 +125,8 @@ OPTIONS
 	the user can further edit the note message.
 
 --ref <ref>::
-	Manipulate the notes tree in <ref>.  This overrides both
-	GIT_NOTES_REF and the "core.notesRef" configuration.  The ref
+	Manipulate the notes tree in <ref>.  This overrides
+	'GIT_NOTES_REF' and the "core.notesRef" configuration.  The ref
 	is taken to be in `refs/notes/` if it is not qualified.
 
 
@@ -187,13 +190,10 @@ CONFIGURATION
 -------------
 
 core.notesRef::
-	When showing commit messages, also show notes which are stored in
-	the given ref.  The ref must be fully qualified.  If the given
-	ref does not exist, it is not an error but means that no
-	notes should be printed.
-+
-This setting defaults to "refs/notes/commits", and it can be overridden by
-the 'GIT_NOTES_REF' environment variable.  See linkgit:git-notes[1].
+	Notes ref to read and manipulate instead of
+	`refs/notes/commits`.  Must be an unabbreviated ref name.
+	This setting can be overridden through the environment and
+	command line.
 
 notes.displayRef::
 	The (fully qualified) refname from which to show notes when
@@ -242,6 +242,15 @@ This setting can be overridden with the `GIT_NOTES_REWRITE_REF`
 environment variable, which must be a colon separated list of refs or
 globs.
 
+
+ENVIRONMENT
+-----------
+
+'GIT_NOTES_REF'::
+	Which ref to manipulate notes from, instead of `refs/notes/commits`.
+	This overrides the `core.notesRef` setting.
+
+
 Author
 ------
 Written by Johannes Schindelin <johannes.schindelin@gmx.de> and
-- 
1.7.1

  parent reply	other threads:[~2010-05-09  3:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-09  3:13 [PATCH v2 0/8] filling out the notes man page Jonathan Nieder
2010-05-09  3:19 ` [PATCH 1/8] Documentation/notes: document format of notes trees Jonathan Nieder
2010-05-09  6:52   ` Jeff King
2010-05-09  3:21 ` [PATCH 2/8] Documentation/notes: describe content of notes blobs Jonathan Nieder
2010-05-09  3:21 ` [PATCH 3/8] Documentation/notes: add configuration section Jonathan Nieder
2010-05-09  3:23 ` Jonathan Nieder [this message]
2010-05-12  7:46   ` [PATCH 4/8] Documentation/notes: simplify treatment of default notes ref Thomas Rast
2010-05-12 10:28     ` Jonathan Nieder
2010-05-09  3:30 ` [PATCH 5/8] Documentation/log: add a CONFIGURATION section Jonathan Nieder
2010-05-09  6:57   ` Jeff King
2010-05-09  3:32 ` [PATCH 6/8] Documentation/notes: simplify treatment of default display refs Jonathan Nieder
2010-05-09  7:00   ` Jeff King
2010-05-09  8:43     ` Jonathan Nieder
2010-05-10  6:06       ` Jeff King
2010-05-12 10:50         ` Jonathan Nieder
2010-05-12 11:23           ` Jeff King
2010-05-09  3:33 ` [PATCH 7/8] Documentation/notes: clean up description of rewriting configuration Jonathan Nieder
2010-05-09  3:37 ` [PATCH 8/8] Documentation/notes: nitpicks Jonathan Nieder
2010-05-10 23:27 ` [PATCH v2 0/8] filling out the notes man page Johan Herland
2010-05-12  7:48   ` Thomas Rast
2010-05-12 12:57     ` [PATCH v3] Documentation/notes: fill out the man page a little Jonathan Nieder

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=20100509032358.GD7958@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    --cc=peff@peff.net \
    --cc=trast@student.ethz.ch \
    /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).