diff options
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-x | t/t5601-clone.sh | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index eb9a093e25..7df3c5373a 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -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' ' @@ -704,7 +719,7 @@ test_expect_success 'batch missing blob request during checkout' ' # Ensure that there is only one negotiation by checking that there is # only "done" line sent. ("done" marks the end of negotiation.) GIT_TRACE_PACKET="$(pwd)/trace" git -C client checkout HEAD^ && - grep "git> done" trace >done_lines && + grep "fetch> done" trace >done_lines && test_line_count = 1 done_lines ' |