]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5601-clone.sh
Merge branch 'dl/checkout-p-merge-base'
[thirdparty/git.git] / t / t5601-clone.sh
index 15fb64c18d860e582542c0ae225897b9b22e89d0..7df3c5373ae605098b52fb8d2771ada81efbebee 100755 (executable)
@@ -631,6 +631,20 @@ test_expect_success CASE_INSENSITIVE_FS 'colliding file detection' '
        test_i18ngrep "the following paths have collided" icasefs/warning
 '
 
+test_expect_success 'clone with GIT_DEFAULT_HASH' '
+       (
+               sane_unset GIT_DEFAULT_HASH &&
+               git init --object-format=sha1 test-sha1 &&
+               git init --object-format=sha256 test-sha256
+       ) &&
+       test_commit -C test-sha1 foo &&
+       test_commit -C test-sha256 foo &&
+       GIT_DEFAULT_HASH=sha1 git clone test-sha256 test-clone-sha256 &&
+       GIT_DEFAULT_HASH=sha256 git clone test-sha1 test-clone-sha1 &&
+       git -C test-clone-sha1 status &&
+       git -C test-clone-sha256 status
+'
+
 partial_clone_server () {
               SERVER="$1" &&
 
@@ -669,7 +683,8 @@ test_expect_success 'partial clone' '
 
 test_expect_success 'partial clone with -o' '
        partial_clone_server server &&
-       git clone -o blah --filter=blob:limit=0 "file://$(pwd)/server" client
+       git clone -o blah --filter=blob:limit=0 "file://$(pwd)/server" client &&
+       test_cmp_config -C client "blob:limit=0" --get-all remote.blah.partialclonefilter
 '
 
 test_expect_success 'partial clone: warn if server does not support object filtering' '