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

Re: [PATCH v4 2/2] index-pack: --fsck-objects to take an optional argument for fsck msgs

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Mar 8, 2024, 22:24 UTC
Message-ID
<20240308222439.GB1908@szeder.dev>
In-Reply-To
<f29ab9136fb4c23c5700a73731a5e220f92b7c30.1706751483.git.gitgitgadget@gmail.com>
On Thu, Feb 01, 2024 at 01:38:02AM +0000, John Cai via GitGitGadget wrote:
Show 31 quoted lines
> diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
> index 496fffa0f8a..a58f91035d1 100755
> --- a/t/t5300-pack-object.sh
> +++ b/t/t5300-pack-object.sh
> @@ -441,8 +441,7 @@ test_expect_success 'index-pack with --strict' '
>  	)
>  '
>  
> -test_expect_success 'index-pack with --strict downgrading fsck msgs' '
> -	test_when_finished rm -rf strict &&
> +test_expect_success 'setup for --strict and --fsck-objects downgrading fsck msgs' '
>  	git init strict &&
>  	(
>  		cd strict &&
> @@ -457,12 +456,32 @@ test_expect_success 'index-pack with --strict downgrading fsck msgs' '
>  
>  		EOF
>  		git hash-object --literally -t commit -w --stdin <commit >commit_list &&
> -		PACK=$(git pack-objects test <commit_list) &&
> -		test_must_fail git index-pack --strict "test-$PACK.pack" &&
> -		git index-pack --strict="missingEmail=ignore" "test-$PACK.pack"
> +		git pack-objects test <commit_list >pack-name
>  	)
>  '
>  
> +test_with_bad_commit () {
> +	must_fail_arg="$1" &&
> +	must_pass_arg="$2" &&
> +	(
> +		cd strict &&
> +		test_expect_fail git index-pack "$must_fail_arg" "test-$(cat pack-name).pack"
There is no such command as 'test_expect_fail', resulting in:
  expecting success of 5300.34 'index-pack with --strict downgrading fsck msgs':
          test_with_bad_commit --strict --strict="missingEmail=ignore"
  + test_with_bad_commit --strict --strict=missingEmail=ignore
  + must_fail_arg=--strict
  + must_pass_arg=--strict=missingEmail=ignore
  + cd strict
  + cat pack-name
  + test_expect_fail git index-pack --strict test-e4e1649155bf444fbd9cd85e376628d6eaf3d3bd.pack
  ./t5300-pack-object.sh: 468: eval: test_expect_fail: not found
  + cat pack-name
  + git index-pack --strict=missingEmail=ignore test-e4e1649155bf444fbd9cd85e376628d6eaf3d3bd.pack
  e4e1649155bf444fbd9cd85e376628d6eaf3d3bd
  ok 34 - index-pack with --strict downgrading fsck msgs

The missing command should fail the test, but it doesn't, because the &&-chain is broken on this line as well.

Previous: John Cai via GitGitGadgetNext: John Cai
Message 27 of 29 in “index-pack: fsck honor checks”
  1. 0/2 index-pack: fsck honor checksJohn Cai via GitGitGadget, Jan 25, 2024
  2. 1/2 index-pack: test and document --strict=<msg>John Cai via GitGitGadget, Jan 25, 2024
  3. Junio C HamanoJan 25, 2024
  4. 2/2 index-pack: --fsck-objects to take an optional argument for fsck msgsJohn Cai via GitGitGadget, Jan 25, 2024
  5. Junio C HamanoJan 25, 2024
  6. 0/2 index-pack: fsck honor checksJohn Cai via GitGitGadget, Jan 26, 2024
  7. 1/2 index-pack: test and document --strict=<msg>John Cai via GitGitGadget, Jan 26, 2024
  8. Junio C HamanoJan 26, 2024
  9. 2/2 index-pack: --fsck-objects to take an optional argument for fsck msgsJohn Cai via GitGitGadget, Jan 26, 2024
  10. Junio C HamanoJan 26, 2024
  11. John CaiJan 26, 2024
  12. 0/2 index-pack: fsck honor checksJohn Cai via GitGitGadget, Jan 26, 2024
  13. 1/2 index-pack: test and document --strict=<msg-id>=<severity>...John Cai via GitGitGadget, Jan 26, 2024
  14. 2/2 index-pack: --fsck-objects to take an optional argument for fsck msgsJohn Cai via GitGitGadget, Jan 26, 2024
  15. Junio C HamanoJan 26, 2024
  16. John CaiJan 26, 2024
  17. Patrick SteinhardtJan 29, 2024
  18. Junio C HamanoJan 29, 2024
  19. Jonathan TanJan 26, 2024
  20. John CaiJan 27, 2024
  21. Jonathan TanJan 31, 2024
  22. John CaiFeb 1, 2024
  23. Junio C HamanoFeb 1, 2024
  24. 0/2 index-pack: fsck honor checksJohn Cai via GitGitGadget, Feb 1, 2024
  25. 1/2 index-pack: test and document --strict=<msg-id>=<severity>...John Cai via GitGitGadget, Feb 1, 2024
  26. 2/2 index-pack: --fsck-objects to take an optional argument for fsck msgsJohn Cai via GitGitGadget, Feb 1, 2024
  27. SZEDER GáborMar 8, 2024
  28. John CaiMar 9, 2024
  29. Christian CouderFeb 2, 2024

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.