git-p4: add failing test for "git-p4: respect excluded paths when detecting branches"
[gitweb.git] / t / t1060-object-corruption.sh
index ac1f189fd29b171c16af17e1d3ddda48f557df89..bc89371f53436dbf3427f231f560ef1b1f8683f6 100755 (executable)
@@ -117,12 +117,24 @@ test_expect_failure 'clone --local detects misnamed objects' '
 '
 
 test_expect_success 'fetch into corrupted repo with index-pack' '
+       cp -R bit-error bit-error-cp &&
+       test_when_finished "rm -rf bit-error-cp" &&
        (
-               cd bit-error &&
+               cd bit-error-cp &&
                test_must_fail git -c transfer.unpackLimit=1 \
                        fetch ../no-bit-error 2>stderr &&
                test_i18ngrep ! -i collision stderr
        )
 '
 
+test_expect_success 'internal tree objects are not "missing"' '
+       git init missing-empty &&
+       (
+               cd missing-empty &&
+               empty_tree=$(git hash-object -t tree /dev/null) &&
+               commit=$(echo foo | git commit-tree $empty_tree) &&
+               git rev-list --objects $commit
+       )
+'
+
 test_done