summaryrefslogtreecommitdiff
path: root/Documentation/git-notes.txt
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2010-03-12 17:04:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-13 05:55:39 (GMT)
commit160baa0d9cbdfcdb6251aa5ede77c59c0d53edfd (patch)
tree278241bc0737a69c78be1a15655ff05c66261a46 /Documentation/git-notes.txt
parentb079feed64238558fa24ba8ade892d84628a05ac (diff)
downloadgit-160baa0d9cbdfcdb6251aa5ede77c59c0d53edfd.zip
git-160baa0d9cbdfcdb6251aa5ede77c59c0d53edfd.tar.gz
git-160baa0d9cbdfcdb6251aa5ede77c59c0d53edfd.tar.bz2
notes: implement 'git notes copy --stdin'
This implements a mass-copy command that takes a sequence of lines in the format <from-sha1> SP <to-sha1> [ SP <rest> ] LF on stdin, and copies each <from-sha1>'s notes to the <to-sha1>. The <rest> is ignored. The intent, of course, is that this can read the same input that the 'post-rewrite' hook gets. The copy_note() function is exposed for everyone's and in particular the next commit's use. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-notes.txt')
-rw-r--r--Documentation/git-notes.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 7abd0fb..6ab3f98 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -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>]
@@ -56,6 +56,16 @@ copy::
objects 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).