git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/8] Documentation/notes: simplify treatment of default notes ref

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 9, 2010, 03:23 UTC
Message-ID
<20100509032358.GD7958@progeny.tock>
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
Previous: Jonathan NiederNext: Thomas Rast
Message 6 of 21 in “filling out the notes man page”
  1. 0/8 filling out the notes man pageJonathan Nieder, May 9, 2010
  2. 1/8 Documentation/notes: document format of notes treesJonathan Nieder, May 9, 2010
  3. Jeff KingMay 9, 2010
  4. 2/8 Documentation/notes: describe content of notes blobsJonathan Nieder, May 9, 2010
  5. 3/8 Documentation/notes: add configuration sectionJonathan Nieder, May 9, 2010
  6. 4/8 Documentation/notes: simplify treatment of default notes refJonathan Nieder, May 9, 2010
  7. Thomas RastMay 12, 2010
  8. Jonathan NiederMay 12, 2010
  9. 5/8 Documentation/log: add a CONFIGURATION sectionJonathan Nieder, May 9, 2010
  10. Jeff KingMay 9, 2010
  11. 6/8 Documentation/notes: simplify treatment of default display refsJonathan Nieder, May 9, 2010
  12. Jeff KingMay 9, 2010
  13. Jonathan NiederMay 9, 2010
  14. Jeff KingMay 10, 2010
  15. Jonathan NiederMay 12, 2010
  16. Jeff KingMay 12, 2010
  17. 7/8 Documentation/notes: clean up description of rewriting configurationJonathan Nieder, May 9, 2010
  18. 8/8 Documentation/notes: nitpicksJonathan Nieder, May 9, 2010
  19. Johan HerlandMay 10, 2010
  20. Thomas RastMay 12, 2010
  21. Documentation/notes: fill out the man page a littleJonathan Nieder, May 12, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.