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

Re: ab/fsck-unexpected-type (and "cat-file replace handling and optimization")

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 7, 2021, 21:37 UTC
Message-ID
<xmqq8rz4pldt.fsf@gitster.g>
In-Reply-To
<YVzLRSa9/vUWJPL0@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I don't mind rebasing on top if that's easier for Junio, but in that
> case it may make sense to float the test cleanup to the front of the
> series.

Yeah, I would rather not to see such a rebase (and I hate the kind of churns we seem to be allowing more and more in our codebase that causes needless textual conflicts. We should really slow down and make fewer pointless "clean-up" that disrupts real work).

Show 25 quoted lines
> diff --cc t/t1006-cat-file.sh
> index a5e7401af8,4a753705ec..0000000000
> --- a/t/t1006-cat-file.sh
> +++ b/t/t1006-cat-file.sh
> @@@ -475,9 -332,18 +475,13 @@@ test_expect_success "Size of broken obj
>   	test_cmp expect actual
>   '
>   
> + test_expect_success 'clean up broken object' '
>  -	rm .git/objects/$(test_oid_to_path $bogus_sha1)
> ++	rm .git/objects/$(test_oid_to_path $bogus_short_sha1)
> + '
> + 
>  -bogus_type="abcdefghijklmnopqrstuvwxyz1234679"
>  -bogus_content="bogus"
>  -bogus_size=$(strlen "$bogus_content")
>  -bogus_sha1=$(echo_without_newline "$bogus_content" | git hash-object -t $bogus_type --literally -w --stdin)
>  -
>   test_expect_success "Type of broken object is correct when type is large" '
>  -	echo $bogus_type >expect &&
>  -	git cat-file -t --allow-unknown-type $bogus_sha1 >actual &&
>  +	echo $bogus_long_type >expect &&
>  +	git cat-file -t --allow-unknown-type $bogus_long_sha1 >actual &&
>   	test_cmp expect actual
>   '
These look sensible, but ...
Show 8 quoted lines
> - test_expect_success 'cat-file -t and -s on corrupt loose object' '
> - 	git init --bare corrupt-loose.git &&
> - 	(
> - 		cd corrupt-loose.git &&
> ...
> - 		test_must_fail git fsck 2>err.fsck &&
> - 		grep "^error: inflate: data stream error (" err.fsck
> - 	)
... what's this lossage of the whole new test?
> + test_expect_success 'clean up broken object' '
>  -	rm .git/objects/$(test_oid_to_path $bogus_sha1)
> ++	rm .git/objects/$(test_oid_to_path $bogus_long_sha1)
>   '
Again, this one makes sense.
Thanks.
Previous: Ævar Arnfjörð BjarmasonNext: Jeff King
Message 9 of 15 in “What's cooking in git.git (Oct 2021, #01; Mon, 4)”
  1. Junio C HamanoOct 4, 2021
  2. Taylor BlauOct 4, 2021
  3. ab/refs-errno-cleanupÆvar Arnfjörð Bjarmason, Oct 5, 2021
  4. hm/paint-hits-in-log-grepÆvar Arnfjörð Bjarmason, Oct 5, 2021
  5. ab/designated-initializers-moreÆvar Arnfjörð Bjarmason, Oct 5, 2021
  6. ab/fsck-unexpected-type (and "cat-file replace handling and optimization")Ævar Arnfjörð Bjarmason, Oct 5, 2021
  7. Jeff KingOct 5, 2021
  8. Ævar Arnfjörð BjarmasonOct 6, 2021
  9. Junio C HamanoOct 7, 2021
  10. Jeff KingOct 8, 2021
  11. Junio C HamanoOct 8, 2021
  12. ab/make-sparse-for-realÆvar Arnfjörð Bjarmason, Oct 6, 2021
  13. ab/parse-options-cleanup & ab/align-parse-options-help & ab/help-config-varsÆvar Arnfjörð Bjarmason, Oct 6, 2021
  14. Junio C HamanoOct 6, 2021
  15. ab/refs-errno-cleanup & "errno" removal in the refs backendÆvar Arnfjörð Bjarmason, Oct 6, 2021

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.