diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-07-08 14:53:11 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-07-08 14:53:11 -0700 |
| commit | 125e38947087906be17fb4e237fc09764df97c65 (patch) | |
| tree | d3a5a64bacceb6485f186f99048cce117de76dbc /t/t5607-clone-bundle.sh | |
| parent | 3997614c249b4b475d07c00556446d8b698d1a49 (diff) | |
| parent | 63d903ff52594eb52289abb89db1a4bca7b0f946 (diff) | |
Merge branch 'xx/bundie-uri-fixes'
When bundleURI interface fetches multiple bundles, Git failed to
take full advantage of all bundles and ended up slurping duplicated
objects.
* xx/bundie-uri-fixes:
unbundle: extend object verification for fetches
fetch-pack: expose fsckObjects configuration logic
bundle-uri: verify oid before writing refs
Diffstat (limited to 't/t5607-clone-bundle.sh')
| -rwxr-xr-x | t/t5607-clone-bundle.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh index ac5ce9b648..7ceaa8194d 100755 --- a/t/t5607-clone-bundle.sh +++ b/t/t5607-clone-bundle.sh @@ -139,6 +139,41 @@ test_expect_success 'fetch SHA-1 from bundle' ' git fetch --no-tags foo/tip.bundle "$(cat hash)" ' +test_expect_success 'clone bundle with different fsckObjects configurations' ' + test_create_repo bundle-fsck && + ( + cd bundle-fsck && + test_commit A && + commit_a=$(git rev-parse A) && + tree_a=$(git rev-parse A^{tree}) && + cat >data <<-EOF && + tree $tree_a + parent $commit_a + author A U Thor + committer A U Thor + + commit: this is a commit with bad emails + + EOF + bad_commit=$(git hash-object --literally -t commit -w --stdin <data) && + git branch bad $bad_commit && + git bundle create bad.bundle bad + ) && + + git clone bundle-fsck/bad.bundle bundle-no-fsck && + + git -c fetch.fsckObjects=false -c transfer.fsckObjects=true \ + clone bundle-fsck/bad.bundle bundle-fetch-no-fsck && + + test_must_fail git -c fetch.fsckObjects=true \ + clone bundle-fsck/bad.bundle bundle-fetch-fsck 2>err && + test_grep "missingEmail" err && + + test_must_fail git -c transfer.fsckObjects=true \ + clone bundle-fsck/bad.bundle bundle-transfer-fsck 2>err && + test_grep "missingEmail" err +' + test_expect_success 'git bundle uses expected default format' ' git bundle create bundle HEAD^.. && cat >expect <<-EOF && |
