Re: [PATCH 0/2] clone: suppress unexpected advice message during clone
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Mar 20, 2025, 11:10 UTC
- Message-ID
- <926210f4-a8ff-4ac2-8b7f-85cd5598d77b@gmail.com>
- In-Reply-To
- <20250320014646.2899791-1-jltobler@gmail.com>
Hi Justin
On 20/03/2025 01:46, Justin Tobler wrote:
Show 8 quoted lines
> > A side-effect of this change is that the location of the first > `git_default_branch_name()` gets deferred to a later point of execution. > This matters because `git_default_branch_name()` only computes the > default branch name once and returns a cached value for subsequent > invocations. After this change, the `git_default_branch_name()` call > site that actually computes the value becomes `guess_remote_head()` and > is configured to always show the advice message.
Isn't the fundamental cause of this bug that advise() ignores GIT_ADVICE? I'm not really clear why "git --no-advice" only applies to advice that is guarded by advice_enabled() when it is documented as disabling all advice hints.
Best Wishes
Phillip