Re: [PATCH 13/16] init: allow alternate backends to be set for new repos
- From
Jeff King <peff@peff.net>
- Date
- Dec 5, 2015, 07:44 UTC
- Message-ID
- <20151205074444.GD21639@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8DDKW4np7N+KA=dpz9uNke0+cyQD-J3U74VM=4WbsjrKQ@mail.gmail.com>
On Sat, Dec 05, 2015 at 07:30:13AM +0100, Duy Nguyen wrote:
Show 11 quoted lines
> On Thu, Dec 3, 2015 at 1:35 AM, David Turner <dturner@twopensource.com> 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