Subject: Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

From: David Turner <[email-masked]>
Date: Mon, 07 Dec 2015 19:38:52 -0500

On Sat, 2015-12-05 at 02:44 -0500, Jeff King wrote:
> On Sat, Dec 05, 2015 at 07:30:13AM +0100, Duy Nguyen wrote:
> 
> > On Thu, Dec 3, 2015 at 1:35 AM, David Turner <[email-masked]> 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?

I'd like to migrate, but I don't want to write that code prematurely.  I
figure we can get everything else right first.  

> 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.

Will fix.

> 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".

I did that in a later patch, but now is a better time; will fix.