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

[PATCH 1/4] Documentation/notes: describe effect of environment and configuration

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 3, 2010, 23:41 UTC
Message-ID
<20100503234140.GA27483@progeny.tock>
In-Reply-To
<20100503233604.GA27451@progeny.tock>
Based on the description from Documentation/config.txt.

For now, this does not share text with Documentation/config.txt because that makes it easier to think about how to describe the environment variables.

Cc: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/git-notes.txt |   82 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 4e5113b..b26598e 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -135,6 +135,88 @@ usual rules (see linkgit:git-commit[1]).  These details may change in
 the future.
 
 
+CONFIGURATION
+-------------
+
+core.notesRef::
+	By default, 'git notes' and other commands read and manipulate
+	the notes referred to by `refs/notes/commits`.  This
+	configuration item allows one to specify an alternative
+	default ref (to be overridden by environment variables or
+	command-line options).
+
+notes.displayRef::
+	Which refs, in addition to the default set by `core.notesRef`
+	or 'GIT_NOTES_REF', for 'git log' to read notes from when
+	showing commit messages.  Can be a (fully qualified) ref name
+	or glob.  You may also specify this configuration variable
+	several times.
++
+This setting can be overridden with the 'GIT_NOTES_DISPLAY_REF'
+environment variable.
+
+notes.rewrite.<command>::
+	When rewriting commits with <command> (currently `amend` or
+	`rebase`), if this variable is `false`, git will not copy
+	notes from the original to the rewritten commit.  Defaults to
+	`true`.  See also "`notes.rewriteRef`" below.
++
+This setting can be overridden by the 'GIT_NOTES_REWRITE_REF'
+environment variable.
+
+notes.rewriteMode::
+	When copying notes during a rewrite, what to do if the target
+	commit already has a note.  Must be one of `overwrite`,
+	`concatenate`, or `ignore`.  Defaults to `concatenate`.
++
+This setting can be overridden with the `GIT_NOTES_REWRITE_MODE`
+environment variable.
+
+notes.rewriteRef::
+	When copying notes during a rewrite, specifies the (fully
+	qualified) ref whose notes should be copied.  May be a glob,
+	in which case notes in all matching refs will be copied.  You
+	may also specify this configuration several times.
++
+Does not have a default value.  Configure this variable to enable note
+rewriting.
++
+Can be overridden with the 'GIT_NOTES_REWRITE_REF' environment variable.
+
+See linkgit:git-config[1] for details.
+
+ENVIRONMENT
+-----------
+
+'GIT_NOTES_REF'::
+	Which ref to manipulate notes from, instead of `refs/notes/commits`.
+	This overrides the `core.notesRef` setting.
+
+'GIT_NOTES_DISPLAY_REF'::
+	Which refs, in addition to the default from `core.notesRef` or
+	'GIT_NOTES_REF', to read notes from when showing commit
+	messages.
+	Must be a colon-delimited list of refs or globs.
+	This overrides the `notes.displayRef` setting.
++
+A warning will be issued for refs that do not exist, but a glob that
+does not match any refs is silently ignored.
+
+'GIT_NOTES_REWRITE_MODE'::
+	When copying notes during a rewrite, what to do if the target
+	commit already has a note.
+	Must be one of `overwrite`, `concatenate`, or `ignore`.
+	This overrides the `core.rewriteMode` setting.
+
+'GIT_NOTES_REWRITE_REF'::
+	When rewriting commits, which notes to copy from the original
+	to the rewritten commit.  Must be a colon-delimited list of
+	refs or globs.
++
+If not set in the environment, the list of notes to copy will depend
+on the `notes.rewrite.<command>` and `notes.rewriteRef` settings.
+
+
 Author
 ------
 Written by Johannes Schindelin <johannes.schindelin@gmx.de> and
-- 
1.7.1
Previous: Jonathan NiederNext: Thomas Rast
Message 2 of 11 in “Documentation/notes: fill out the man page a little”
  1. 0/4 Documentation/notes: fill out the man page a littleJonathan Nieder, May 3, 2010
  2. 1/4 Documentation/notes: describe effect of environment and configurationJonathan Nieder, May 3, 2010
  3. Thomas RastMay 4, 2010
  4. 2/4 Documentation/notes: adjust description to use configuration sectionJonathan Nieder, May 3, 2010
  5. 3/4 Documentation/notes: describe content of notesJonathan Nieder, May 3, 2010
  6. Thomas RastMay 4, 2010
  7. Johan HerlandMay 4, 2010
  8. Jeff KingMay 5, 2010
  9. 4/4 Documentation/notes: nitpicksJonathan Nieder, May 3, 2010
  10. Thomas RastMay 4, 2010
  11. Jonathan NiederMay 4, 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.