Subject: Re: [PATCH] git.c: remove the_repository dependence in run_builtin()

From: Junio C Hamano <[email-masked]>
Date: Thu, 12 Jun 2025 21:49:23 -0700

lidongyan <[email-masked]> writes:

>>> The comment before trace_repo_setup() advises not to use get_git_dir(),
>>> but this note is unrelated to trace_repo_setup() itself. Additionally,
>>> get_git_dir() has now been renamed to repo_get_git_dir(). Remove this
>>> comment line.
>> ... 
> However, I believe this concern is no longer relevant:
> repo_get_git_dir() no longer sets up the Git repository environment as the
> original comment implied. Instead, all the necessary setup is now handled
> by setup_git_env(), which is invoked by setup_git_directory_gently() after
> the prefix has been determined. As a result, I believe it is no longer necessary
> to retain this comment message.

If so, please update the explanation.  It reads as if the only
reason for removing the comment is because of the rename of the
function.  If the reason is because the behaviour has changed and it
is not relevant anymore, the readers should be told about it.

Thanks.