From: Johan Herland Date: Tue, 04 May 2010 09:55:01 GMT Subject: Re: [PATCH 3/4] Documentation/notes: describe content of notes Message-ID: <201005041155.02192.johan@herland.net> In-Reply-To: <20100503234229.GC27483@progeny.tock> On Tuesday 04 May 2010, Jonathan Nieder wrote: > Signed-off-by: Jonathan Nieder > --- > Documentation/git-notes.txt | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt > index 0594776..273264b 100644 > --- a/Documentation/git-notes.txt > +++ b/Documentation/git-notes.txt > @@ -27,6 +27,10 @@ By default, notes are saved to and read from > `refs/notes/commits`, but this default can be overridden. See the > CONFIGURATION and ENVIRONMENT sections below. > > +Notes can contain any sequence of non-null bytes. Since they are > +sanitized with linkgit:git-stripspace[1], empty lines other than a > +single line separating paragraphs are not significant. In principle, a note is a regular Git (blob) object, and can contain NUL bytes - indeed any kind of (non-)format is accepted. However, the stripspace/text-based formatting kicks in when specifying the notes content with -m or -F, or when an editor is used to edit the notes. So as long as you stick to the following subcommands, notes should be completely binary-safe: - git notes [list []] - git notes add [-f] -C - git notes copy [-f] - git notes show [] - git notes remove [] - git notes prune In other words, you can (binary-safely) create notes from files with the following construct: git notes add -C $(git hash-object -w ) Of course, it doesn't make much sense displaying non-text-format notes with 'git log', so if you use such notes you'll probably need to write some special-purpose tools for doing anything useful with them. Otherwise, your other 3 patches seem fine to me (modulo Thomas Rast's comments) and you can consider them Acked-by: Johan Herland Have fun! :) ...Johan -- Johan Herland, www.herland.net