Would it be possible to use a bare git clone for the index? The checked-out files currently take about 75MB on disk, but it's all redundant with .git/objects/. If the files can be read in-memory via whatever libgit2 has equivalent to git cat-file, then they shouldn't need to be checked out at all.