diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-02-09 14:21:01 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-02-09 14:21:01 -0800 |
| commit | d991df4bf6259bc53223feb71957c961b7b8fa84 (patch) | |
| tree | 962a3b5ce0484140d4b24c726f2794d53cd28601 /t | |
| parent | Merge branch 'jt/sparse-checkout-leading-dir-fix' (diff) | |
| parent | clone: support unusual remote ref configurations (diff) | |
| download | git-d991df4bf6259bc53223feb71957c961b7b8fa84.tar.gz git-d991df4bf6259bc53223feb71957c961b7b8fa84.zip | |
Merge branch 'jt/clone-not-quite-empty'
Cloning from a repository that does not yet have any branches or
tags but has other refs resulted in a "remote transport reported
error", which has been corrected.
* jt/clone-not-quite-empty:
clone: support unusual remote ref configurations
Diffstat (limited to 't')
| -rwxr-xr-x | t/t5700-protocol-v1.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t5700-protocol-v1.sh b/t/t5700-protocol-v1.sh index 468bd3e13e..6c8d4c6cf1 100755 --- a/t/t5700-protocol-v1.sh +++ b/t/t5700-protocol-v1.sh @@ -149,6 +149,21 @@ test_expect_success 'push with file:// using protocol v1' ' grep "push< version 1" log ' +test_expect_success 'cloning branchless tagless but not refless remote' ' + rm -rf server client && + + git -c init.defaultbranch=main init server && + echo foo >server/foo.txt && + git -C server add foo.txt && + git -C server commit -m "message" && + git -C server update-ref refs/notbranch/alsonottag HEAD && + git -C server checkout --detach && + git -C server branch -D main && + git -C server symbolic-ref HEAD refs/heads/nonexistentbranch && + + git -c protocol.version=1 clone "file://$(pwd)/server" client +' + # Test protocol v1 with 'ssh://' transport # test_expect_success 'setup ssh wrapper' ' |
