diff options
Diffstat (limited to 't/t5530-upload-pack-error.sh')
-rwxr-xr-x | t/t5530-upload-pack-error.sh | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh index 4ce9a9f704..7c1460eaa9 100755 --- a/t/t5530-upload-pack-error.sh +++ b/t/t5530-upload-pack-error.sh @@ -14,7 +14,6 @@ corrupt_repo () { } test_expect_success 'setup and corrupt repository' ' - test_oid_init && echo file >file && git add file && git rev-parse :file && @@ -89,6 +88,23 @@ test_expect_success 'upload-pack fails due to error in pack-objects enumeration' grep "pack-objects died" output.err ' +test_expect_success 'upload-pack tolerates EOF just after stateless client wants' ' + test_commit initial && + head=$(git rev-parse HEAD) && + + { + packetize "want $head" && + packetize "shallow $head" && + packetize "deepen 1" && + printf "0000" + } >request && + + printf "0000" >expect && + + git upload-pack --stateless-rpc . <request >actual && + test_cmp expect actual +' + test_expect_success 'create empty repository' ' mkdir foo && @@ -99,7 +115,7 @@ test_expect_success 'create empty repository' ' test_expect_success 'fetch fails' ' - test_must_fail git fetch .. master + test_must_fail git fetch .. main ' |