It's unnecessary to detect the repository object format from git repository. Just use the repository's object format name.
db.DefaultContext
modules/mirror
services