From: Jeff King Date: Sat, 05 Dec 2015 07:44:44 GMT Subject: Re: [PATCH 13/16] init: allow alternate backends to be set for new repos Message-ID: <20151205074444.GD21639@sigill.intra.peff.net> In-Reply-To: On Sat, Dec 05, 2015 at 07:30:13AM +0100, Duy Nguyen wrote: > On Thu, Dec 3, 2015 at 1:35 AM, David Turner wrote: > > git init learns a new argument --refs-backend-type. Presently, only > > "files" is supported, but later we will add other backends. > > > > When this argument is used, the repository's core.refsBackendType > > configuration value is set, and the refs backend's initdb function is > > used to set up the ref database. > > git-init can also be used on existing repos. What happens in that case > if we use --refs-backend-type. Will existing refs be migrated to the > new backend or hidden away? It would be neat if it migrated, but I suspect that may introduce complications. It's probably OK in the initial implementation to bail if the option is used in an existing repo. I think the config option needs to be extensions.refsBackendType, too, per the logic in 00a09d5 (introduce "extensions" form of core.repositoryformatversion, 2015-06-23). And I guess it needs to bump core.repositoryformatversion to "1". -Peff