From: Junio C Hamano Date: Thu, 23 Jul 2020 02:04:52 GMT Subject: Re: [PATCH v3 32/39] setup: add support for reading extensions.objectformat Message-ID: In-Reply-To: <20200723010943.2329634-33-sandals@crustytoothpaste.net> "brian m. carlson" 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.