Subject: Re: [PATCH 01/21] environment: make `get_git_dir()` accept a repository

From: Patrick Steinhardt <[email-masked]>
Date: Fri, 30 Aug 2024 09:42:41 +0200

On Thu, Aug 29, 2024 at 03:15:36PM -0500, Justin Tobler wrote:
> On 24/08/29 11:38AM, Patrick Steinhardt wrote:
> [snip]
> > --- a/builtin/commit.c
> > +++ b/builtin/commit.c
> > @@ -407,7 +407,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
> >  
> >  		discard_index(the_repository->index);
> >  		read_index_from(the_repository->index, get_lock_file_path(&index_lock),
> > -				get_git_dir());
> > +				repo_get_git_dir(the_repository));
> 
> Now that the `repo_get_git_dir()` function has been moved to
> "repository.h" should we also directly include this header in the c
> file? Or is the implicit reference sufficent? From our coding guidelines
> is seems we preferred to be direct.
> 
> It looks like there are several other hunks missing direct references to
> "repository.h" too.

Yeah, you're right. Let me go through all the commits and double
check whether includes need to change. Oh, well... sounds like fun
*sigh*

Patrick