diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 30 | ||||
-rw-r--r-- | Documentation/git-notes.txt | 4 | ||||
-rw-r--r-- | Documentation/githooks.txt | 4 |
3 files changed, 38 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 503942a2e4..2e02f1b075 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1305,6 +1305,36 @@ The effective value of "core.notesRef" (possibly overridden by GIT_NOTES_REF) is also implicitly added to the list of refs to be displayed. +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. ++ +This setting can be overridden with the `GIT_NOTES_REWRITE_REF` +environment variable, which must be a colon separated list of refs or +globs. + +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`. ++ +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. ++ +Does not have a default value; you must configure this variable to +enable note rewriting. + pack.window:: The size of the window used by linkgit:git-pack-objects[1] when no window size is given on the command line. Defaults to 10. diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt index 6ab3f982b9..b12d1cf539 100644 --- a/Documentation/git-notes.txt +++ b/Documentation/git-notes.txt @@ -35,6 +35,10 @@ This command always manipulates the notes specified in "core.notesRef" To change which notes are shown by 'git-log', see the "notes.displayRef" configuration. +See the description of "notes.rewrite.<command>" in +linkgit:git-config[1] for a way of carrying your notes across commands +that rewrite commits. + SUBCOMMANDS ----------- diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index a741769742..7183aa9abb 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -335,6 +335,10 @@ The 'extra-info' is again command-dependent. If it is empty, the preceding SP is also omitted. Currently, no commands pass any 'extra-info'. +The hook always runs after the automatic note copying (see +"notes.rewrite.<command>" in linkgit:git-config.txt) has happened, and +thus has access to these notes. + The following command-specific comments apply: rebase:: |