rev-list: allow cached objects in existence check
[gitweb.git] / t / t1060-object-corruption.sh
index ac1f189fd29b171c16af17e1d3ddda48f557df89..807b63b473b45b0814003e6404204d03cf717e4a 100755 (executable)
@@ -125,4 +125,14 @@ test_expect_success 'fetch into corrupted repo with index-pack' '
        )
 '
 
+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