Thread (51 messages) 51 messages, 6 authors, 2016-06-15

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

flat view

From: David Turner <hidden>
Date: 2016-06-15 23:08:33

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:
quoted
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.  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help