git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Justin Tobler <jltobler@gmail.com>, phillip.wood@dunelm.org.uk
Cc: git@vger.kernel.org, ps@pks.im
Subject: Re: [PATCH 0/2] clone: suppress unexpected advice message during clone
Date: Fri, 21 Mar 2025 16:42:10 +0000	[thread overview]
Message-ID: <1849284e-b5cc-40fd-ba59-43559a20ac2e@gmail.com> (raw)
In-Reply-To: <yyeid3njdsmws7rl3kcsxne52fuadd7q4emqdlvatwvcrnyl42@rfnk26mvcgoa>

On 20/03/2025 23:48, Justin Tobler wrote:
> On 25/03/20 11:10AM, Phillip Wood wrote:
>> Hi Justin
>>
>> On 20/03/2025 01:46, Justin Tobler wrote:
>>>
>>> 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.
> 
>  From my point of view, this advice message should never be presented in
> this particular scenario regardless of the configuration as it doesn't
> make much sense here. This also happens to be the original behavior so I
> think we should probably return to that state.

Oh, good point. So the original report actually highlights two bugs - 
the regression you're fixing here and the fact that "--no-advice" does 
not suppress the advice.

> I was also a bit suprised to see that not all advice messages respect
> the `--no-advice` option. I'm not sure if there is a reason for this, or if
> `advise_if_enabled()` just came later and not everything was converted.
> 
> In general though, other users of the default branch name advice message
> should probably follow the `--no-advice` option. I'll add another patch
> that does this in the next version.

That would be great,

Thanks

Phillip

> Thanks,
> -Justin
> 


  reply	other threads:[~2025-03-21 16:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  9:53 bug: git shows hints that should be suppressed alan
2025-03-19  9:58 ` alan
2025-03-19 14:45 ` Elijah Newren
2025-03-20  1:36   ` Justin Tobler
2025-03-20  1:46     ` [PATCH 0/2] clone: suppress unexpected advice message during clone Justin Tobler
2025-03-20  1:46       ` [PATCH 1/2] remote: allow `guess_remote_head()` to suppress advice Justin Tobler
2025-03-20  5:13         ` Patrick Steinhardt
2025-03-20 23:30           ` Justin Tobler
2025-03-21  8:52           ` Junio C Hamano
2025-03-20  1:46       ` [PATCH 2/2] clone: suppress unexpected default branch advice Justin Tobler
2025-03-20  5:13         ` Patrick Steinhardt
2025-03-20 23:36           ` Justin Tobler
2025-03-20 11:10       ` [PATCH 0/2] clone: suppress unexpected advice message during clone Phillip Wood
2025-03-20 23:48         ` Justin Tobler
2025-03-21 16:42           ` Phillip Wood [this message]
2025-03-21 23:16       ` [PATCH v2 0/3] " Justin Tobler
2025-03-21 23:16         ` [PATCH v2 1/3] remote: allow `guess_remote_head()` to suppress advice Justin Tobler
2025-03-24  9:31           ` Phillip Wood
2025-03-24 15:21             ` Justin Tobler
2025-03-24 19:29               ` phillip.wood123
2025-03-21 23:16         ` [PATCH v2 2/3] builtin/clone: suppress unexpected default branch advice Justin Tobler
2025-03-24  9:32           ` Phillip Wood
2025-03-24 15:35             ` Justin Tobler
2025-03-21 23:16         ` [PATCH v2 3/3] advice: allow disabling default branch name advice Justin Tobler
2025-03-24  9:32           ` Phillip Wood
2025-03-23 19:38         ` [PATCH v2 0/3] clone: suppress unexpected advice message during clone Junio C Hamano
2025-03-25  0:51         ` [PATCH v3 " Justin Tobler
2025-03-25  0:51           ` [PATCH v3 1/3] remote: allow `guess_remote_head()` to suppress advice Justin Tobler
2025-03-25  0:51           ` [PATCH v3 2/3] builtin/clone: suppress unexpected default branch advice Justin Tobler
2025-03-25  0:51           ` [PATCH v3 3/3] advice: allow disabling default branch name advice Justin Tobler
2025-03-25 14:35           ` [PATCH v3 0/3] clone: suppress unexpected advice message during clone Phillip Wood
2025-03-20  4:05     ` bug: git shows hints that should be suppressed alan

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=1849284e-b5cc-40fd-ba59-43559a20ac2e@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /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;
as well as URLs for NNTP newsgroup(s).