On Tue, Sep 08, 2026 at 05:12:21PM -0500, Justin Tobler wrote:
Show 44 quoted lines
> On 26/09/07 10:25AM, Patrick Steinhardt wrote:
> > diff --git a/setup.h b/setup.h
> > index 763fd384e8..c4aa464caa 100644
> > --- a/setup.h
> > +++ b/setup.h
> > @@ -256,23 +256,21 @@ int apply_repository_format(struct repository *repo,
> >
> > const char *get_template_dir(const char *option_template);
> >
> > -#define INIT_DB_QUIET (1 << 0)
> > -#define INIT_DB_EXIST_OK (1 << 1)
> > -#define INIT_DB_SKIP_REFDB (1 << 2)
> > -
> > -int init_db(struct repository *repo,
> > - const char *git_dir,
> > - const char *real_git_dir,
> > - const char *worktree,
> > - const char *template_dir, int hash_algo,
> > - enum ref_storage_format ref_storage_format,
> > - const char *initial_branch, int init_shared_repository,
> > - unsigned int flags);
> > +void create_repository(struct repository *repo,
> > + const char *git_dir,
> > + const char *real_git_dir,
> > + const char *worktree,
> > + const char *template_dir,
> > + int hash_algo,
> > + enum ref_storage_format ref_storage_format,
> > + int init_shared_repository,
> > + int *reinit_ok);
>
> While we are here, it might be nice to document these functions a little
> bit. The NULL/non-NULL behavior of `reinit_ok` may not be entirely
> obvious to future readers.
>
> > void initialize_repository_version(struct repository *repo,
> > int hash_algo,
> > enum ref_storage_format ref_storage_format,
> > int reinit);
> > void create_reference_database(struct repository *repo, const char *initial_branch, int quiet);
> > +void create_object_database(struct repository *repo);
>
> It might also be nice to document these functions to explain exactly
> what we are "creating".