Duy Nguyen <pclo...@gmail.com> writes:

>> Perhaps a comment before init_db() to tell callers to always call
>> the other one is the least thing necessary?
>
> Good thinking. We could go a step further, baking it as assert() to
> catch new/incorrect call sequences automatically.
>
> Or we could combine the two functions init_db() and set_git_dir_init()
> into one. I prefer this one, but having problem with finding a good
> name for it ...

It probably is a reasonable way forward to name the combined
function that takes the parameters that are taken by both functions
in their current incarnation init_db().  After all, initializing the
Git repository database involves telling the function where the .git
directory is, among other things like where to take the template for
a newly created repository is.

Reply via email to