t5325: check both on-disk and in-memory reverse index
commit6885cd7dc573b1750b8d895820b8b2f56285f070
authorTaylor Blau <me@ttaylorr.com>
Fri, 29 Jan 2021 01:32:02 +0000 (28 20:32 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Jan 2021 06:51:51 +0000 (28 22:51 -0800)
tree8e3fc04b46fe7a9e28bdb44b63588ae009fdf14d
parentec8e7760ac38ef426f87ec738454e574be53a00e
t5325: check both on-disk and in-memory reverse index

Right now, the test suite can be run with 'GIT_TEST_WRITE_REV_INDEX=1'
in the environment, which causes all operations which write a pack to
also write a .rev file.

To prepare for when that eventually becomes the default, we should
continue to test the in-memory reverse index, too, in order to avoid
losing existing coverage. Unfortunately, explicit existing coverage is
rather sparse, so only a basic test is added that compares the result of

    git rev-list --objects --no-object-names --all |
    git cat-file --batch-check='%(objectsize:disk) %(objectname)'

with and without an on-disk reverse index.

Suggested-by: Jeff King <peff@peff.net>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5325-reverse-index.sh