Storing the git_otype at the beginning of the data stream.
Git object headers can be read without copying the entire object.
Nested transactions can not be MDB_RDONLY.

A non-nested transaction is not be able to see the objects written earlier, in the parent transaction, until it was committed.
Objects are saved to a git pack file.

The LMDB  based Libgit₂ backend is used as as temporary store for the loose objects before they are copied into the pack file.
All LMDB backend reads must be nest-able.
Saving actually produces a commit.

Additionally, even the initial commit is stored in a pack file.
The git index file is unneeded after a commit.
Restore the previously saved state to the index before applying changes during a save.