repository: add minimal reinitialization of repository This currently only ensures that the version of the repository format isn't greater than zero.