Fix crash when running on bare repositories.