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>

Michael J Gruber committed Aug 25, 2011 at 12:26 UTC 11432bb467c2ba45014fc2fe8c4e23c92b7356d6
1 file changed +5 -2
Documentation/git-notes.txt
+5 -2
@@ -142,8 +142,9 @@ OPTIONS
142
143 -C <object>::
144 --reuse-message=<object>::
145 - Take the note message from the given blob object (for
146 - example, another note).
145 + Take the given blob object (for example, another note) as the
146 + note message. (Use `git notes copy <object>` instead to
147 + copy notes between objects.)
148
149 -c <object>::
150 --reedit-message=<object>::
@@ -285,6 +286,8 @@ $ blob=$(git hash-object -w a.out)
286 $ git notes --ref=built add -C "$blob" HEAD
287 ------------
288
289 +(You cannot simply use `git notes --ref=built add -F a.out HEAD`
290 +because that is not binary-safe.)
291 Of course, it doesn't make much sense to display non-text-format notes
292 with 'git log', so if you use such notes, you'll probably need to write
293 some special-purpose tools to do something useful with them.