Code

Merge branch 'rc/maint-curl-helper' into maint
[git.git] / Documentation / git-notes.txt
index 7abd0fbd2373b737fbdbdac3f4cc1616a6c7fbbf..4e5113b837230c8f050cf4bbe10e8de4b3271bd0 100644 (file)
@@ -10,7 +10,7 @@ SYNOPSIS
 [verse]
 'git notes' [list [<object>]]
 'git notes' add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
-'git notes' copy [-f] <from-object> <to-object>
+'git notes' copy [-f] ( --stdin | <from-object> <to-object> )
 'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
 'git notes' edit [<object>]
 'git notes' show [<object>]
@@ -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
 -----------
@@ -47,15 +51,25 @@ list::
 
 add::
        Add notes for a given object (defaults to HEAD). Abort if the
-       object already has notes, abort. (use `-f` to overwrite an
+       object already has notes (use `-f` to overwrite an
        existing note).
 
 copy::
        Copy the notes for the first object onto the second object.
        Abort if the second object already has notes, or if the first
-       objects has none. (use -f to overwrite existing notes to the
+       object has none (use -f to overwrite existing notes to the
        second object). This subcommand is equivalent to:
        `git notes add [-f] -C $(git notes list <from-object>) <to-object>`
++
+In `\--stdin` mode, take lines in the format
++
+----------
+<from-object> SP <to-object> [ SP <rest> ] LF
+----------
++
+on standard input, and copy the notes from each <from-object> to its
+corresponding <to-object>.  (The optional `<rest>` is ignored so that
+the command can read the input given to the `post-rewrite` hook.)
 
 append::
        Append to the notes of an existing object (defaults to HEAD).
@@ -102,6 +116,25 @@ OPTIONS
        Like '-C', but with '-c' the editor is invoked, so that
        the user can further edit the note message.
 
+--ref <ref>::
+       Manipulate the notes tree in <ref>.  This overrides both
+       GIT_NOTES_REF and the "core.notesRef" configuration.  The ref
+       is taken to be in `refs/notes/` if it is not qualified.
+
+
+NOTES
+-----
+
+Every notes change creates a new commit at the specified notes ref.
+You can therefore inspect the history of the notes by invoking, e.g.,
+`git log -p notes/commits`.
+
+Currently the commit message only records which operation triggered
+the update, and the commit authorship is determined according to the
+usual rules (see linkgit:git-commit[1]).  These details may change in
+the future.
+
+
 Author
 ------
 Written by Johannes Schindelin <johannes.schindelin@gmx.de> and