git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
> 
Previous: Johan HerlandNext: Johan Herland
Message 5 of 8 in “Bug/request: the empty string should be a valid git note”
  1. James H. FisherSep 20, 2014
  2. James H. FisherSep 20, 2014
  3. Johan HerlandSep 21, 2014
  4. notes: Allow adding empty notes with -CJohan Herland, Sep 21, 2014
  5. Torsten BögershausenSep 21, 2014
  6. Johan HerlandSep 21, 2014
  7. Kyle J. McKaySep 21, 2014
  8. Junio C HamanoSep 22, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.