]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5558-clone-bundle-uri.sh
The eighth batch
[thirdparty/git.git] / t / t5558-clone-bundle-uri.sh
index 996a08e90c9c2c5b2c37405b1b3082e82d29a7e8..1ca5f745e73bd30deb9fc2dfa79baa10d63345bf 100755 (executable)
@@ -33,6 +33,15 @@ test_expect_success 'clone with path bundle' '
        test_cmp expect actual
 '
 
+test_expect_success 'clone with path bundle and non-default hash' '
+       test_when_finished "rm -rf clone-path-non-default-hash" &&
+       GIT_DEFAULT_HASH=sha256 git clone --bundle-uri="clone-from/B.bundle" \
+               clone-from clone-path-non-default-hash &&
+       git -C clone-path-non-default-hash rev-parse refs/bundles/topic >actual &&
+       git -C clone-from rev-parse topic >expect &&
+       test_cmp expect actual
+'
+
 test_expect_success 'clone with file:// bundle' '
        git clone --bundle-uri="file://$(pwd)/clone-from/B.bundle" \
                clone-from clone-file &&
@@ -284,6 +293,15 @@ test_expect_success 'clone HTTP bundle' '
        test_config -C clone-http log.excludedecoration refs/bundle/
 '
 
+test_expect_success 'clone HTTP bundle with non-default hash' '
+       test_when_finished "rm -rf clone-http-non-default-hash" &&
+       GIT_DEFAULT_HASH=sha256 git clone --bundle-uri="$HTTPD_URL/B.bundle" \
+               "$HTTPD_URL/smart/fetch.git" clone-http-non-default-hash &&
+       git -C clone-http-non-default-hash rev-parse refs/bundles/topic >actual &&
+       git -C clone-from rev-parse topic >expect &&
+       test_cmp expect actual
+'
+
 test_expect_success 'clone bundle list (HTTP, no heuristic)' '
        test_when_finished rm -f trace*.txt &&