summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2010-02-13 21:28:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-14 03:36:17 (GMT)
commite73bbd96c6e9ce11a101dac03402d0f718a1bd23 (patch)
treeb4922667d15dbc5bca2d4a3b0898cb30b7bdedd5 /Documentation
parent5848769f9de68cfb0735710c6c4d2f08aa53f317 (diff)
downloadgit-e73bbd96c6e9ce11a101dac03402d0f718a1bd23.zip
git-e73bbd96c6e9ce11a101dac03402d0f718a1bd23.tar.gz
git-e73bbd96c6e9ce11a101dac03402d0f718a1bd23.tar.bz2
builtin-notes: Add "copy" subcommand for copying notes between objects
This is useful for keeping notes to objects that are being rewritten by e.g. 'git commit --amend', 'git rebase', or 'git cherry-pick'. "git notes copy <from> <to>" is in practice equivalent to "git notes add -C $(git notes list <from>) <to>", although it is somewhat more convenient for regular users. "git notes copy" takes the same -f option as "git add", to overwrite existing notes at the target (instead of aborting with an error message). If the <from>-object has no notes, "git notes copy" will abort with an error message. The patch includes tests verifying correct behaviour of the new subcommand. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-notes.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 15de4b3..14f73b9 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -10,6 +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' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
'git notes' edit [<object>]
'git notes' show [<object>]
@@ -48,6 +49,13 @@ add::
object already has notes, abort. (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
+ second object). This subcommand is equivalent to:
+ `git notes add [-f] -C $(git notes list <from-object>) <to-object>`
+
append::
Append to the notes of an existing object (defaults to HEAD).
Creates a new notes object if needed.