Re: [PATCH 06/10] setup: refactor repo format reading and verification
- From
Jeff King <peff@peff.net>
- Date
- Mar 3, 2016, 18:28 UTC
- Message-ID
- <20160303182833.GC24171@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8B6j2AB5CCBVVz7f1JShq0XVicJfzZvjRO54ksde0RMfQ@mail.gmail.com>
On Thu, Mar 03, 2016 at 08:19:22PM +0700, Duy Nguyen wrote:
Show 17 quoted lines
> On Tue, Mar 1, 2016 at 9:42 PM, Jeff King <peff@peff.net> wrote:
> > - for (i = 0; i < unknown_extensions.nr; i++)
> > - warning("unknown repository extension: %s",
> > - unknown_extensions.items[i].string);
> > - *nongit_ok = -1;
> > - ret = -1;
> > +int verify_repository_format(const struct repository_format *format,
> > + struct strbuf *err)
> > +{
> > + if (GIT_REPO_VERSION_READ < format->version) {
> > + strbuf_addf(err, "Expected git repo version <= %d, found %d",
> > + GIT_REPO_VERSION_READ, format->version);
> > + return -1;
>
> Since you have given lots of thoughts about this code, perhaps just a
> little bit more, double check if these strings should be translatable
> or not and mark _() if so?I don't see any reason they cannot be. I prefer not to mix it in with the other changes, though, so I'll do a patch on top.
-Peff