X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5300-pack-object.sh;h=ccfc64c6eef7e0aba7bd8a8496427470e9020309;hb=dcbf0417453297207c7e61efbf1f38621b1caa3f;hp=04522857abb716b8866e0f5153ec33b3ac780536;hpb=78f111e12de40e2d9aa8d0774acc287f79862b13;p=git.git diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index 04522857a..ccfc64c6e 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -180,6 +180,23 @@ test_expect_success \ unset GIT_OBJECT_DIRECTORY +test_expect_success 'survive missing objects/pack directory' ' + ( + rm -fr missing-pack && + mkdir missing-pack && + cd missing-pack && + git init && + GOP=.git/objects/pack + rm -fr $GOP && + git index-pack --stdin --keep=test <../test-3-${packname_3}.pack && + test -f $GOP/pack-${packname_3}.pack && + test_cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack && + test -f $GOP/pack-${packname_3}.idx && + test_cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx && + test -f $GOP/pack-${packname_3}.keep + ) +' + test_expect_success \ 'verify pack' \ 'git verify-pack test-1-${packname_1}.idx \