diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-12 04:04:11 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-12 04:04:11 +0300 |
commit | e0ad9574ddf5bb14d9ed6808112485ce0da99fea (patch) | |
tree | 633eb1867a929588ec5b3d8af351a93ba62aac5a /t/t5510-fetch.sh | |
parent | 4f0a8be78499454eac3985b6e7e144b8376ab0a5 (diff) | |
parent | e023ff0691ca207d421a0e75ea23c132ada9142a (diff) |
Merge branch 'bc/sha-256-part-3'
The final leg of SHA-256 transition.
* bc/sha-256-part-3: (39 commits)
t: remove test_oid_init in tests
docs: add documentation for extensions.objectFormat
ci: run tests with SHA-256
t: make SHA1 prerequisite depend on default hash
t: allow testing different hash algorithms via environment
t: add test_oid option to select hash algorithm
repository: enable SHA-256 support by default
setup: add support for reading extensions.objectformat
bundle: add new version for use with SHA-256
builtin/verify-pack: implement an --object-format option
http-fetch: set up git directory before parsing pack hashes
t0410: mark test with SHA1 prerequisite
t5308: make test work with SHA-256
t9700: make hash size independent
t9500: ensure that algorithm info is preserved in config
t9350: make hash size independent
t9301: make hash size independent
t9300: use $ZERO_OID instead of hard-coded object ID
t9300: abstract away SHA-1-specific constants
t8011: make hash size independent
...
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-x | t/t5510-fetch.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 7456c567cd..e567cba38d 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -281,15 +281,19 @@ test_expect_success 'create bundle 1' ' cd "$D" && echo >file updated again by origin && git commit -a -m "tip" && - git bundle create bundle1 master^..master + git bundle create --version=3 bundle1 master^..master ' test_expect_success 'header of bundle looks right' ' - head -n 4 "$D"/bundle1 && - head -n 1 "$D"/bundle1 | grep "^#" && - head -n 2 "$D"/bundle1 | grep "^-$OID_REGEX " && - head -n 3 "$D"/bundle1 | grep "^$OID_REGEX " && - head -n 4 "$D"/bundle1 | grep "^$" + cat >expect <<-EOF && + # v3 git bundle + @object-format=$(test_oid algo) + -OID updated by origin + OID refs/heads/master + + EOF + sed -e "s/$OID_REGEX/OID/g" -e "5q" "$D"/bundle1 >actual && + test_cmp expect actual ' test_expect_success 'create bundle 2' ' |