Re: [PATCH] git-notes.txt: clarify -C vs. copy and -F

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

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

Yeah, it utterly is broken.  Why not fix it before people start making
serious use of notes?

>  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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]