Re: [PATCH v7 29/33] setup: configure ref storage on setup
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Mar 1, 2016, 17:18 UTC
- Message-ID
- <56D5CECD.6020301@ramsayjones.plus.com>
- In-Reply-To
- <1456793586-22082-30-git-send-email-dturner@twopensource.com>
On 01/03/16 00:53, David Turner wrote:
Show 22 quoted lines
> This sets up the existing backend early, so that other code which > reads refs is reading from the right place. > > Signed-off-by: David Turner <dturner@twopensource.com> > Signed-off-by: Junio C Hamano <gitster@pobox.com> > --- > config.c | 1 + > setup.c | 4 ++++ > 2 files changed, 5 insertions(+) > > diff --git a/config.c b/config.c > index 9ba40bc..cca7e28 100644 > --- a/config.c > +++ b/config.c > @@ -11,6 +11,7 @@ > #include "strbuf.h" > #include "quote.h" > #include "hashmap.h" > +#include "refs.h" > #include "string-list.h" > #include "utf8.h" >
I was just skimming these patches as they passed by, and this caught my eye. If this include is required (eg. to fix a compiler warning), then it should probably be in an earlier patch. Otherwise, it should be in a later patch, no?
ATB, Ramsay Jones
Show 16 quoted lines
> diff --git a/setup.c b/setup.c
> index bd3a2cf..e2e1220 100644
> --- a/setup.c
> +++ b/setup.c
> @@ -457,6 +457,10 @@ static int check_repository_format_gently(const char *gitdir, int *nongit_ok)
> ret = -1;
> }
>
> + register_ref_storage_backends();
> + if (set_ref_storage_backend(ref_storage_backend))
> + die(_("Unknown ref storage backend %s"), ref_storage_backend);
> +
> strbuf_release(&sb);
> return ret;
> }
>