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

[PATCH 7/8] Documentation/notes: clean up description of rewriting configuration

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 9, 2010, 03:33 UTC
Message-ID
<20100509033327.GG7958@progeny.tock>
In-Reply-To
<20100509031357.GA7926@progeny.tock>

Clarify that the GIT_NOTES_REWRITE_REFS environment variable overrides both ‘[notes "rewrite"] <command>’ and ‘[notes] rewriteRef’.

Add explanations of GIT_NOTES_REWRITE_MODE and GIT_NOTES_REWRITE_REFS to the ENVIRONMENT section.

Cc: Leif Arne Storset <lstorset@opera.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/git-notes.txt |   47 ++++++++++++++++++++++++++----------------
 1 files changed, 29 insertions(+), 18 deletions(-)
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 7856b28..d868535 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -38,9 +38,8 @@ message, after an unindented line saying "Notes (<refname>):" (or
 To change which notes are shown by 'git log', see the
 "notes.displayRef" configuration in linkgit:git-log[1].
 
-See the description of "notes.rewrite.<command>" in
-linkgit:git-config[1] for a way of carrying your notes across commands
-that rewrite commits.
+See the "notes.rewrite.<command>" configuration for a way to carry
+notes across commands that rewrite commits.
 
 
 SUBCOMMANDS
@@ -206,33 +205,31 @@ notes.displayRef::
 
 notes.rewrite.<command>::
 	When rewriting commits with <command> (currently `amend` or
-	`rebase`) and this variable is set to `true`, git
-	automatically copies your notes from the original to the
-	rewritten commit.  Defaults to `true`, but see
-	"notes.rewriteRef" below.
+	`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 (see the
-	"notes.rewrite.<command>" option), determines what to do if
-	the target commit already has a note.  Must be one of
-	`overwrite`, `concatenate`, or `ignore`.  Defaults to
-	`concatenate`.
+	When copying notes during a rewrite, what to do if the target
+	commit already has a note.  Must be one of `overwrite`,
+	`concatenate`, and `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.  The ref may be a
-	glob, in which case notes in all matching refs will be copied.
-	You may also specify this configuration several times.
+	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; you must configure this variable to
 enable note rewriting.
 +
-This setting can be overridden with the `GIT_NOTES_REWRITE_REF`
-environment variable, which must be a colon separated list of refs or
-globs.
+Can be overridden with the 'GIT_NOTES_REWRITE_REF' environment variable.
 
 
 ENVIRONMENT
@@ -252,6 +249,20 @@ ENVIRONMENT
 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`, and `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 depends
+on the `notes.rewrite.<command>` and `notes.rewriteRef` settings.
+
 
 Author
 ------
-- 
1.7.1
Previous: Jeff KingNext: Jonathan Nieder
Message 17 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.