"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes: > @@ -613,6 +622,11 @@ int verify_repository_format(const struct repository_format *format, > return -1; > } > > + if (format->version <= 0 && format->hash_algo != GIT_HASH_SHA1) { > + strbuf_addstr(err, _("extensions.objectFormat is not valid in repo v0")); > + return -1; > + } > + > return 0; > } > By declaring that the repository is invalid if its version is less than 1 and objectFormat extension defined, we prevent unwanted upgrading from happening by mistake. OK.