aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-notes.txt
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2011-08-25 12:26:37 +0200
committerJunio C Hamano <gitster@pobox.com>2011-08-25 13:16:46 -0700
commit11432bb467c2ba45014fc2fe8c4e23c92b7356d6 (patch)
treea1c764f4a3ae8ddd0f9a418cd7115d621ca6908f /Documentation/git-notes.txt
parentccef6048cd697063967e5e02937911fd8125b364 (diff)
downloadgit-11432bb467c2ba45014fc2fe8c4e23c92b7356d6.tar.gz
git-11432bb467c2ba45014fc2fe8c4e23c92b7356d6.tar.xz
git-notes.txt: clarify -C vs. copy and -F
The current description of '-C' together with the analogy to 'git commit -C' can lead to the wrong conclusion that '-C' copies notes between objects. Make this clearer by rewording and pointing to 'copy'. The example for attaching binary notes with 'git hash-object' followed by 'git notes add -C' immediately raises the question: "Why not use 'git notes add -F'?". Answer it (the latter is not binary-safe). Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> 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.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 6a187f2e2..e8319eac6 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -142,8 +142,9 @@ OPTIONS
-C <object>::
--reuse-message=<object>::
- Take the note message from the given blob object (for
- example, another note).
+ Take the given blob object (for example, another note) as the
+ note message. (Use `git notes copy <object>` instead to
+ copy notes between objects.)
-c <object>::
--reedit-message=<object>::
@@ -285,6 +286,8 @@ $ blob=$(git hash-object -w a.out)
$ git notes --ref=built add -C "$blob" HEAD
------------
+(You cannot simply use `git notes --ref=built add -F a.out HEAD`
+because that is not binary-safe.)
Of course, it doesn't make much sense to display non-text-format notes
with 'git log', so if you use such notes, you'll probably need to write
some special-purpose tools to do something useful with them.