public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: lidongyan <502024330056@smail.nju.edu.cn>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git.c: remove the_repository dependence in run_builtin()
Date: Thu, 12 Jun 2025 21:49:23 -0700	[thread overview]
Message-ID: <xmqq5xh0b60c.fsf@gitster.g> (raw)
In-Reply-To: <11AE19A1-7B19-45CE-AFCE-98D89A4570F7@smail.nju.edu.cn> (lidongyan's message of "Fri, 13 Jun 2025 09:53:40 +0800")

lidongyan <502024330056@smail.nju.edu.cn> 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.

  reply	other threads:[~2025-06-13  4:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12  4:59 [PATCH] git.c: remove the_repository dependence in run_builtin() Lidong Yan
2025-06-12 17:16 ` Junio C Hamano
2025-06-13  1:53   ` lidongyan
2025-06-13  4:49     ` Junio C Hamano [this message]
2025-06-14  5:03 ` [PATCH v2] " Lidong Yan
2025-06-14 23:35   ` Junio C Hamano
2025-06-15  1:49     ` Lidong Yan
2025-06-16  0:53       ` Junio C Hamano
2025-06-16  5:36         ` Lidong Yan
2025-06-16  5:41           ` Junio C Hamano
2025-06-15 14:46   ` [RFC PATCH v3 0/2] small fixes for git.c and setup.c Lidong Yan
2025-06-15 14:46     ` [PATCH v3 1/2] git.c: remove the_repository dependence in run_builtin() Lidong Yan
2025-06-15 14:46     ` [PATCH v3 2/2] setup: fix NEEDSWORK in setup_git_directory_gently() Lidong Yan
2025-06-16  1:25     ` [RFC PATCH v3 0/2] small fixes for git.c and setup.c Junio C Hamano
2025-06-16  1:36       ` Lidong Yan
2025-06-16  6:22     ` [PATCH v4] git.c: remove the_repository dependence in run_builtin() Lidong Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq5xh0b60c.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=502024330056@smail.nju.edu.cn \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox