Documentation/notes: clean up description of rewriting configuration
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
May 8, 2010 at 22:33 UTC
c5ce1836719dc77e3c8495206653037cb5c4e511
1 file changed
+29
-18
Documentation/git-notes.txt
+29
-18
@@ -38,9 +38,8 @@ message, after an unindented line saying "Notes (<refname>):" (or
38
To change which notes are shown by 'git log', see the
39
"notes.displayRef" configuration in linkgit:git-log[1].
40
41
-See the description of "notes.rewrite.<command>" in
42
-linkgit:git-config[1] for a way of carrying your notes across commands
43
-that rewrite commits.
41
+See the "notes.rewrite.<command>" configuration for a way to carry
42
+notes across commands that rewrite commits.
43
44
45
SUBCOMMANDS
@@ -206,33 +205,31 @@ notes.displayRef::
205
206
notes.rewrite.<command>::
207
When rewriting commits with <command> (currently `amend` or
209
- `rebase`) and this variable is set to `true`, git
210
- automatically copies your notes from the original to the
211
- rewritten commit. Defaults to `true`, but see
212
- "notes.rewriteRef" below.
208
+ `rebase`), if this variable is `false`, git will not copy
209
+ notes from the original to the rewritten commit. Defaults to
210
+ `true`. See also "`notes.rewriteRef`" below.
211
++
212
+This setting can be overridden by the 'GIT_NOTES_REWRITE_REF'
213
+environment variable.
214
215
notes.rewriteMode::
215
- When copying notes during a rewrite (see the
216
- "notes.rewrite.<command>" option), determines what to do if
217
- the target commit already has a note. Must be one of
218
- `overwrite`, `concatenate`, or `ignore`. Defaults to
219
- `concatenate`.
216
+ When copying notes during a rewrite, what to do if the target
217
+ commit already has a note. Must be one of `overwrite`,
218
+ `concatenate`, and `ignore`. Defaults to `concatenate`.
219
+
220
This setting can be overridden with the `GIT_NOTES_REWRITE_MODE`
221
environment variable.
222
223
notes.rewriteRef::
224
When copying notes during a rewrite, specifies the (fully
226
- qualified) ref whose notes should be copied. The ref may be a
227
- glob, in which case notes in all matching refs will be copied.
228
- You may also specify this configuration several times.
225
+ qualified) ref whose notes should be copied. May be a glob,
226
+ in which case notes in all matching refs will be copied. You
227
+ may also specify this configuration several times.
228
+
229
Does not have a default value; you must configure this variable to
230
enable note rewriting.
231
+
233
-This setting can be overridden with the `GIT_NOTES_REWRITE_REF`
234
-environment variable, which must be a colon separated list of refs or
235
-globs.
232
+Can be overridden with the 'GIT_NOTES_REWRITE_REF' environment variable.
233
234
235
ENVIRONMENT
@@ -252,6 +249,20 @@ ENVIRONMENT
249
A warning will be issued for refs that do not exist, but a glob that
250
does not match any refs is silently ignored.
251
252
+'GIT_NOTES_REWRITE_MODE'::
253
+ When copying notes during a rewrite, what to do if the target
254
+ commit already has a note.
255
+ Must be one of `overwrite`, `concatenate`, and `ignore`.
256
+ This overrides the `core.rewriteMode` setting.
257
+
258
+'GIT_NOTES_REWRITE_REF'::
259
+ When rewriting commits, which notes to copy from the original
260
+ to the rewritten commit. Must be a colon-delimited list of
261
+ refs or globs.
262
++
263
+If not set in the environment, the list of notes to copy depends
264
+on the `notes.rewrite.<command>` and `notes.rewriteRef` settings.
265
+
266
267
Author
268
------