From 0691cff7dca6b68569183be991d59ebb72b6170e Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Sat, 13 Feb 2010 22:28:36 +0100 Subject: builtin-notes: Add -c/-C options for reusing notes Inspired by the -c/-C options to "git commit", we teach these options to "git notes add/append" to allow reuse of note objects. With this patch in place, it is now easy to copy or move notes between objects. For example, to copy object A's notes to object B: git notes add [-f] -C $(git notes list A) B To move instead of copying, you simply remove the notes from the source object afterwards, e.g.: git notes remove A The patch includes tests verifying correct behaviour of the new functionality. Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- Documentation/git-notes.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Documentation/git-notes.txt') diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt index 53c5d9014d..15de4b344a 100644 --- a/Documentation/git-notes.txt +++ b/Documentation/git-notes.txt @@ -9,8 +9,8 @@ SYNOPSIS -------- [verse] 'git notes' [list []] -'git notes' add [-f] [-F | -m ] [] -'git notes' append [-F | -m ] [] +'git notes' add [-f] [-F | -m | (-c | -C) ] [] +'git notes' append [-F | -m | (-c | -C) ] [] 'git notes' edit [] 'git notes' show [] 'git notes' remove [] @@ -84,6 +84,14 @@ OPTIONS Take the note message from the given file. Use '-' to read the note message from the standard input. +-C :: +--reuse-message=:: + Reuse the note message from the given note object. + +-c :: +--reedit-message=:: + Like '-C', but with '-c' the editor is invoked, so that + the user can further edit the note message. Author ------ -- cgit v1.3