git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-notes.txt: clarify -C vs. copy and -F
@ 2011-03-29  8:45 Michael J Gruber
  2011-03-29  9:36 ` Johan Herland
  2011-03-29 18:22 ` Junio C Hamano
  0 siblings, 2 replies; 15+ messages in thread
From: Michael J Gruber @ 2011-03-29  8:45 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Johan Herland

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>
---
In fact, the long name '--reuse-message' is really misleading, but I've been
around long enough to refrain from trying to change it ;)

 Documentation/git-notes.txt |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 296f314..c63b593 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -138,8 +138,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>::
@@ -272,6 +273,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.
-- 
1.7.4.1.607.g888da

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-08-25 18:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29  8:45 [PATCH] git-notes.txt: clarify -C vs. copy and -F Michael J Gruber
2011-03-29  9:36 ` Johan Herland
2011-03-29 18:22 ` Junio C Hamano
2011-03-29 18:25   ` Junio C Hamano
2011-03-29 18:36     ` Michael J Gruber
2011-03-29 19:04       ` Junio C Hamano
2011-03-29 19:57         ` Junio C Hamano
2011-08-25 10:26           ` Michael J Gruber
2011-08-25 18:50             ` Johan Herland
2011-03-30  0:02         ` [RFC/PATCH] Make "git notes add" more user-friendly when there are existing notes Johan Herland
2011-03-30  6:54           ` Michael J Gruber
2011-03-30  9:59             ` Johan Herland
2011-04-04 11:35               ` Lasse Makholm
2011-04-04 12:54                 ` Michael J Gruber
2011-03-30 19:32           ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).