test_must_fail git clone --no-local --bare missing missing-transport
'
-test_expect_failure 'clone --no-local --bare detects misnamed object' '
+test_expect_success 'clone --no-local --bare detects misnamed object' '
test_must_fail git clone --no-local --bare misnamed misnamed-transport
'
test_must_fail git clone --local bit-error corrupt-checkout
'
-test_expect_failure 'clone --local detects missing objects' '
+test_expect_success 'error detected during checkout leaves repo intact' '
+ test_path_is_dir corrupt-checkout/.git
+'
+
+test_expect_success 'clone --local detects missing objects' '
test_must_fail git clone --local missing missing-checkout
'