From: "SZEDER Gábor" <szeder.dev@gmail•com>
To: John Cai via GitGitGadget <gitgitgadget@gmail•com>
Cc: git@vger•kernel.org, Jonathan Tan <jonathantanmy@google•com>,
Patrick Steinhardt <ps@pks•im>, John Cai <johncai86@gmail•com>
Subject: Re: [PATCH v4 2/2] index-pack: --fsck-objects to take an optional argument for fsck msgs
Date: Fri, 8 Mar 2024 23:24:39 +0100 [thread overview]
Message-ID: <20240308222439.GB1908@szeder.dev> (raw)
In-Reply-To: <f29ab9136fb4c23c5700a73731a5e220f92b7c30.1706751483.git.gitgitgadget@gmail.com>
On Thu, Feb 01, 2024 at 01:38:02AM +0000, John Cai via GitGitGadget wrote:
> 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.
next prev parent reply other threads:[~2024-03-08 22:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 20:51 [PATCH 0/2] index-pack: fsck honor checks John Cai via GitGitGadget
2024-01-25 20:51 ` [PATCH 1/2] index-pack: test and document --strict=<msg> John Cai via GitGitGadget
2024-01-25 22:46 ` Junio C Hamano
2024-01-25 20:51 ` [PATCH 2/2] index-pack: --fsck-objects to take an optional argument for fsck msgs John Cai via GitGitGadget
2024-01-25 23:13 ` Junio C Hamano
2024-01-26 17:12 ` [PATCH v2 0/2] index-pack: fsck honor checks John Cai via GitGitGadget
2024-01-26 17:12 ` [PATCH v2 1/2] index-pack: test and document --strict=<msg> John Cai via GitGitGadget
2024-01-26 18:03 ` Junio C Hamano
2024-01-26 17:13 ` [PATCH v2 2/2] index-pack: --fsck-objects to take an optional argument for fsck msgs John Cai via GitGitGadget
2024-01-26 18:13 ` Junio C Hamano
2024-01-26 20:18 ` John Cai
2024-01-26 20:59 ` [PATCH v3 0/2] index-pack: fsck honor checks John Cai via GitGitGadget
2024-01-26 20:59 ` [PATCH v3 1/2] index-pack: test and document --strict=<msg-id>=<severity> John Cai via GitGitGadget
2024-01-26 20:59 ` [PATCH v3 2/2] index-pack: --fsck-objects to take an optional argument for fsck msgs John Cai via GitGitGadget
2024-01-26 21:18 ` [PATCH v3 0/2] index-pack: fsck honor checks Junio C Hamano
2024-01-26 22:11 ` John Cai
2024-01-29 11:15 ` Patrick Steinhardt
2024-01-29 17:18 ` Junio C Hamano
2024-01-26 22:13 ` Jonathan Tan
2024-01-27 2:31 ` John Cai
2024-01-31 22:30 ` Jonathan Tan
2024-02-01 1:34 ` John Cai
2024-02-01 16:44 ` Junio C Hamano
2024-02-01 1:38 ` [PATCH v4 " John Cai via GitGitGadget
2024-02-01 1:38 ` [PATCH v4 1/2] index-pack: test and document --strict=<msg-id>=<severity> John Cai via GitGitGadget
2024-02-01 1:38 ` [PATCH v4 2/2] index-pack: --fsck-objects to take an optional argument for fsck msgs John Cai via GitGitGadget
2024-03-08 22:24 ` SZEDER Gábor [this message]
2024-03-09 1:55 ` John Cai
2024-02-02 15:48 ` [PATCH v4 0/2] index-pack: fsck honor checks Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240308222439.GB1908@szeder.dev \
--to=szeder.dev@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitgitgadget@gmail$(echo .)com \
--cc=johncai86@gmail$(echo .)com \
--cc=jonathantanmy@google$(echo .)com \
--cc=ps@pks$(echo .)im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox