Re: [PATCH v3 4/4] unbundle: introduce new option UNBUNDLE_FSCK_FOLLOW_FETCH
On Mon, May 27, 2024 at 03:41:57PM +0000, Xing Xin via GitGitGadget wrote:
Show 31 quoted lines
> From: Xing Xin <xingxin.xx@bytedance.com>
> diff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh
> index 0d1e92d9963..423b35ac237 100755
> --- a/t/t5607-clone-bundle.sh
> +++ b/t/t5607-clone-bundle.sh
> @@ -138,6 +138,29 @@ test_expect_success 'fetch SHA-1 from bundle' '
> git fetch --no-tags foo/tip.bundle "$(cat hash)"
> '
>
> +test_expect_success 'clone bundle with fetch.fsckObjects' '
> + test_create_repo bundle-fsck &&
> + (
> + cd bundle-fsck &&
> + test_commit first &&
> + cat >data <<-EOF &&
> + tree $(git rev-parse HEAD^{tree})
> + parent $(git rev-parse HEAD)
> + author A U Thor
> + committer A U Thor
> +
> + commit: this is a commit with bad emails
> +
> + EOF
> + git hash-object --literally -t commit -w --stdin <data >commit &&
> + git branch bad $(cat commit) &&
> + git bundle create bad.bundle bad
> + ) &&
> + test_must_fail git -c fetch.fsckObjects=true \
> + clone bundle-fsck/bad.bundle bundle-fsck-clone 2>err &&
> + test_grep "missingEmail" err
> +'Do we also want to have a test for `transfer.fsckObjects`?
Patrick