Re: [PATCH 0/2] clone: suppress unexpected advice message during clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux