Re: [PATCH v6 28/32] config: read ref storage config on startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2016-02-26 at 23:14 -0500, Jeff King wrote:
> On Fri, Feb 26, 2016 at 10:56:34PM -0500, Jeff King wrote:
> 
> > My second confusion is why this is happening in git_config_early().
> > That
> > function is called during the setup of
> > check_repository_format_gently(),
> > which is why I think you wanted to put the code here. But it's
> > _also_
> > called as part of a regular git_config(). Which means we're parsing
> > the
> > repo config and setting the ref backend all over again, every time
> > we
> > look at config for other reasons.
> > 
> > So I think this setup probably should be in
> > check_repository_format_gently(), and should be able to trigger off
> > of
> > the existing ref_storage_backend string we've already saved (and we
> > should bail immediately there if we don't know about the backend,
> > as it
> > means we _don't_ match the repo's extensions and cannot proceed).
> 
> By the way, I notice that the default value for the_refs_backend is
> "&refs_be_files". It might be safer to make this NULL (or some
> &refs_be_null that fills the vtable, but just returns an error for
> each
> call).

In 'refs: register ref storage backends', I do make this change.  I
don't do it earlier because we don't have this config stuff in place
yet.  

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]