list-objects.c: don't add an unparsed NULL as a pending tree
[gitweb.git] / t / t5302-pack-index.sh
index 6424db1f28e11c3ac6eb629ba4db7380812eab72..344ab25b8b6ddcd8b687a72e43b9e26aec18263e 100755 (executable)
@@ -177,4 +177,14 @@ test_expect_success \
        ".git/objects/pack/pack-${pack1}.pack" 2>&1) &&
      echo "$err" | grep "CRC mismatch"'
 
+test_expect_success 'running index-pack in the object store' '
+    rm -f .git/objects/pack/* &&
+    cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack &&
+    (
+       cd .git/objects/pack
+       git index-pack pack-${pack1}.pack
+    ) &&
+    test -f .git/objects/pack/pack-${pack1}.idx
+'
+
 test_done