Re: [PATCH v13 13/13] Add some reftable testing infrastructure
On Wed, May 13, 2020 at 9:57 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 34 quoted lines
>
> "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > diff --git a/builtin/init-db.c b/builtin/init-db.c
> > index b7053b9e370..da5b4670c84 100644
> > --- a/builtin/init-db.c
> > +++ b/builtin/init-db.c
> > @@ -545,7 +545,7 @@ static const char *const init_db_usage[] = {
> > int cmd_init_db(int argc, const char **argv, const char *prefix)
> > {
> > const char *git_dir;
> > - const char *ref_storage_format = DEFAULT_REF_STORAGE;
> > + const char *ref_storage_format = default_ref_storage();
> > const char *real_git_dir = NULL;
> > const char *work_tree;
> > const char *template_dir = NULL;
> > diff --git a/refs.c b/refs.c
> > index e8751415a9e..70c11b05391 100644
> > --- a/refs.c
> > +++ b/refs.c
> > @@ -1742,7 +1742,7 @@ struct ref_store *get_main_ref_store(struct repository *r)
> > r->refs_private = ref_store_init(r->gitdir,
> > r->ref_storage_format ?
> > r->ref_storage_format :
> > - DEFAULT_REF_STORAGE,
> > + default_ref_storage(),
> > REF_STORE_ALL_CAPS);
> > return r->refs_private;
> > }
>
> Would it make sense to let NULL stand for "we use the default,
> whatever it is" so that anybody outside the implementation of the
> refs API does not have to care what the default is, and make
> ref_store_init() function the only thing that knows what it is?Is this your strong recommendation in the form of a question? :)
If it is just a question: maybe. I don't know enough of Git to say for sure.
How do submodules decide on other settings, such as the hash ID?
--
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--
Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado