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

Re: [PATCH 4/7] reftable: avoid writing empty keys at the block layer

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 14, 2022, 01:26 UTC
Message-ID
<xmqqpmovds5q.fsf@gitster.g>
In-Reply-To
<e4c1cc58265ca7ae7b32b9faf41324883011d1a6.1642010868.git.gitgitgadget@gmail.com>
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 13 quoted lines
> diff --git a/reftable/block_test.c b/reftable/block_test.c
> index 4b3ea262dcb..5112ddbf468 100644
> --- a/reftable/block_test.c
> +++ b/reftable/block_test.c
> @@ -42,6 +42,11 @@ static void test_block_read_write(void)
>  			  header_off, hash_size(GIT_SHA1_FORMAT_ID));
>  	reftable_record_from_ref(&rec, &ref);
>  
> +	ref.refname = "";
> +	ref.value_type = REFTABLE_REF_DELETION;
> +	n = block_writer_add(&bw, &rec);
> +	EXPECT(n == REFTABLE_API_ERROR);
> +

The preimage of this hunk has been invalidated by your 9c498398 (reftable: make reftable_record a tagged union, 2021-12-22).

I see that the hn/reftable-coverity-fixes topic, which the commit is a part of, has been expecting a reroll since last year---are you plannning to rebuild that series after landing this series first?

Previous: Han-Wen Nienhuys via GitGitGadgetNext: Han-Wen Nienhuys
Message 6 of 33 in “reftable: avoid reading and writing empty keys”
  1. 0/7 reftable: avoid reading and writing empty keysHan-Wen Nienhuys via GitGitGadget, Jan 12, 2022
  2. 1/7 Documentation: object_id_len goes up to 31Han-Wen Nienhuys via GitGitGadget, Jan 12, 2022
  3. 2/7 reftable: reject 0 object_id_lenHan-Wen Nienhuys via GitGitGadget, Jan 12, 2022
  4. 3/7 reftable: add a test that verifies that writing empty keys failsHan-Wen Nienhuys via GitGitGadget, Jan 12, 2022
  5. 4/7 reftable: avoid writing empty keys at the block layerHan-Wen Nienhuys via GitGitGadget, Jan 12, 2022
  6. Junio C HamanoJan 14, 2022
  7. Han-Wen NienhuysJan 17, 2022
  8. Junio C HamanoJan 17, 2022
  9. 5/7 reftable: ensure that obj_id_len is >= 2 on writingHan-Wen Nienhuys via GitGitGadget, Jan 12, 2022
  10. 6/7 reftable: add test for length of disambiguating prefixHan-Wen Nienhuys via GitGitGadget, Jan 12, 2022
  11. 7/7 reftable: rename writer_stats to reftable_writer_statsHan-Wen Nienhuys via GitGitGadget, Jan 12, 2022
  12. 0/7 reftable: avoid reading and writing empty keysHan-Wen Nienhuys via GitGitGadget, Feb 17, 2022
  13. 1/7 Documentation: object_id_len goes up to 31Han-Wen Nienhuys via GitGitGadget, Feb 17, 2022
  14. 2/7 reftable: reject 0 object_id_lenHan-Wen Nienhuys via GitGitGadget, Feb 17, 2022
  15. Junio C HamanoFeb 18, 2022
  16. 3/7 reftable: add a test that verifies that writing empty keys failsHan-Wen Nienhuys via GitGitGadget, Feb 17, 2022
  17. 4/7 reftable: avoid writing empty keys at the block layerHan-Wen Nienhuys via GitGitGadget, Feb 17, 2022
  18. Junio C HamanoFeb 17, 2022
  19. Han-Wen NienhuysFeb 21, 2022
  20. 5/7 reftable: ensure that obj_id_len is >= 2 on writingHan-Wen Nienhuys via GitGitGadget, Feb 17, 2022
  21. Junio C HamanoFeb 18, 2022
  22. 6/7 reftable: add test for length of disambiguating prefixHan-Wen Nienhuys via GitGitGadget, Feb 17, 2022
  23. 7/7 reftable: rename writer_stats to reftable_writer_statsHan-Wen Nienhuys via GitGitGadget, Feb 17, 2022
  24. Junio C HamanoFeb 18, 2022
  25. 0/7 reftable: avoid reading and writing empty keysHan-Wen Nienhuys via GitGitGadget, Feb 21, 2022
  26. 2/7 reftable: reject 0 object_id_lenHan-Wen Nienhuys via GitGitGadget, Feb 21, 2022
  27. 1/7 Documentation: object_id_len goes up to 31Han-Wen Nienhuys via GitGitGadget, Feb 21, 2022
  28. 4/7 reftable: avoid writing empty keys at the block layerHan-Wen Nienhuys via GitGitGadget, Feb 21, 2022
  29. 3/7 reftable: add a test that verifies that writing empty keys failsHan-Wen Nienhuys via GitGitGadget, Feb 21, 2022
  30. 5/7 reftable: ensure that obj_id_len is >= 2 on writingHan-Wen Nienhuys via GitGitGadget, Feb 21, 2022
  31. 6/7 reftable: add test for length of disambiguating prefixHan-Wen Nienhuys via GitGitGadget, Feb 21, 2022
  32. 7/7 reftable: rename writer_stats to reftable_writer_statsHan-Wen Nienhuys via GitGitGadget, Feb 21, 2022
  33. Junio C HamanoFeb 23, 2022

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.