Re: [RFC/PATCH] notes: Allow adding empty notes with -C
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Sep 21, 2014, 08:53 UTC
- Message-ID
- <541E9203.9040702@web.de>
- In-Reply-To
- <1411268449-14636-1-git-send-email-johan@herland.net>
On 2014-09-21 05.00, Johan Herland wrote: []
Show 9 quoted lines
> diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh > index cfd67ff..a6c399b 100755 > --- a/t/t3301-notes.sh > +++ b/t/t3301-notes.sh > @@ -1239,4 +1239,23 @@ test_expect_success 'git notes get-ref (--ref)' ' > test "$(GIT_NOTES_REF=refs/notes/bar git notes --ref=baz get-ref)" = "refs/notes/baz" > ' > > +cat > expect << EOF
Git style for shell scripts: Plase put no space between < or > or >> and the file name: cat >expect <<EOF
Show 14 quoted lines
> +commit 085b0d1309902c3148feb5a136515bdb9a1cd614 > +Author: A U Thor <author@example.com> > +Date: Thu Apr 7 15:28:13 2005 -0700 > + > + 16th > + > +Notes (foo): > +EOF > + > +test_expect_success 'can create empty note with "git notes add -C $empty_blob"' ' > + test_commit 16th && > + blob=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 && > + git notes add -C $blob && > + git log -1 > actual &&
git log -1 >actual &&
Show 6 quoted lines
> + test_cmp expect actual && > + test "$(git notes list HEAD)" = "$blob" > +' > + > test_done >