diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 23 | ||||
-rw-r--r-- | Documentation/git-notes.txt | 11 | ||||
-rw-r--r-- | Documentation/pretty-options.txt | 11 |
3 files changed, 37 insertions, 8 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 8dcb191566..503942a2e4 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -500,10 +500,12 @@ check that makes sure that existing object files will not get overwritten. core.notesRef:: When showing commit messages, also show notes which are stored in the given ref. This ref is expected to contain files named - after the full SHA-1 of the commit they annotate. + after the full SHA-1 of the commit they annotate. The ref + must be fully qualified. + If such a file exists in the given ref, the referenced blob is read, and -appended to the commit message, separated by a "Notes:" line. If the +appended to the commit message, separated by a "Notes (<refname>):" +line (shortened to "Notes:" in the case of "refs/notes/commits"). If the given ref itself does not exist, it is not an error, but means that no notes should be printed. + @@ -1286,6 +1288,23 @@ mergetool.keepTemporaries:: mergetool.prompt:: Prompt before each invocation of the merge resolution program. +notes.displayRef:: + The (fully qualified) refname from which to show notes when + showing commit messages. The value of this variable can be set + to a glob, in which case notes from all matching refs will be + shown. You may also specify this configuration variable + several times. A warning will be issued for refs that do not + exist, but a glob that does not match any refs is silently + ignored. ++ +This setting can be overridden with the `GIT_NOTES_DISPLAY_REF` +environment variable, which must be a colon separated list of refs or +globs. ++ +The effective value of "core.notesRef" (possibly overridden by +GIT_NOTES_REF) is also implicitly added to the list of refs to be +displayed. + 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 14f73b988e..7abd0fbd23 100644 --- a/Documentation/git-notes.txt +++ b/Documentation/git-notes.txt @@ -27,12 +27,13 @@ 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 message stored in the commit object, the notes are indented like the -message, after an unindented line saying "Notes:". +message, after an unindented line saying "Notes (<refname>):" (or +"Notes:" for the default setting). -To disable notes, you have to set the config variable core.notesRef to -the empty string. Alternatively, you can set it to a different ref, -something like "refs/notes/bugzilla". This setting can be overridden -by the environment variable "GIT_NOTES_REF". +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. SUBCOMMANDS diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt index aa96caeab2..af6d2b995a 100644 --- a/Documentation/pretty-options.txt +++ b/Documentation/pretty-options.txt @@ -30,9 +30,18 @@ people using 80-column terminals. defaults to UTF-8. --no-notes:: ---show-notes:: +--show-notes[=<ref>]:: Show the notes (see linkgit:git-notes[1]) that annotate the commit, when showing the commit log message. This is the default for `git log`, `git show` and `git whatchanged` commands when there is no `--pretty`, `--format` nor `--oneline` option is given on the command line. ++ +With an optional argument, add this ref to the list of notes. The ref +is taken to be in `refs/notes/` if it is not qualified. + +--[no-]standard-notes:: + Enable or disable populating the notes ref list from the + 'core.notesRef' and 'notes.displayRef' variables (or + corresponding environment overrides). Enabled by default. + See linkgit:git-config[1]. |