Re: [PATCH 3/3] advice: allow disabling the automatic hint in advise_if_enabled()

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

 



On 2024-01-20 12:31, Rubén Justo wrote:
On 18-ene-2024 21:50:23, Dragan Simic wrote:
On 2024-01-18 21:19, Junio C Hamano wrote:
> Dragan Simic <dsimic@xxxxxxxxxxx> writes:
> > On 2024-01-18 19:26, Junio C Hamano wrote:
> > > Dragan Simic <dsimic@xxxxxxxxxxx> writes:
> > >
> > > > Perhaps having both options available could be a good thing.
> > > > Though,
> > > > adding quite a few knobs may end up confusing the users, so
> > > > we should
> > > > make sure to document it well.
> > >
> > > I agree there is a need for documentation, but we are not increasing
> > > the number of knobs, are we?
> >
> > Perhaps there would be one more knob if we end up deciding to
> > implement
> > support for both approaches, as previously discussed.
>
> But that would be just one knob (which I personally do not quite see
> the need for), not "quite a few knobs" as you said, no?

I'm sorry for being imprecise.

Hi Dragan

Hello Rubén!

My original motivation for starting this series has been fulfilled:
Give the user an option to tell us not to include the disabling
instructions alongside the advice.

I like the whole idea, because if someone finds some hint usable and
decides to keep it displayed, displaying the additional hint about
disabling the primary hint (i.e. the advice) simply becomes redundant.

The current consensus is: if the user explicitly enables visibility for
an advice, we can stop including the instructions on how to disable its
visibility.

Totally agreed, simple and effective.

As reference, in this thread two "global" options have been reviewed:

 - To take the disabling instructions as an advice in itself and as
   such, as with the rest, we can have a knob to disable it.  Affecting
   all advice messages.

 - A new knob to allow the user to set the default visibility for those
   advice messages without an explicit visibility set.  And so we can
   take on globally what we now take on locally;  if there is not an
   explicit visibility value but there is an explicit "default" value,
   we can stop showing the instruction on how to disable it.

Regarding the need for that additional "global" knob, I think it can't
hurt.  Some people might even find it quite useful

I don't quite understand what "global" knob you are referring to. But I
share with you the feeling that a "global" knob might be useful.

The additional "global knob", at least the way I see it, would enable all
advice messages, overriding all other configuration options that may be
present. It would be like a "big switch" that makes all advices displayed, for the case in which someone decides to get rid of the hint that used to
be useful to them so the advice was disabled, but the hint is no longer
found to be useful to them.  In such cases, having no advice displayed
would mean that the user is unable to know easily what knob disables the
no-longer-favored hint.

The reason for "forcing" all advices to be displayed would be to allow
the advices to be displayed without the need to "fish" for the right knob
to be turned in the configuration file.  Though, it wouldn't be perfect
from the usability standpoint, because recreating the right conditions
for displaying some hint and the associated advice may rather easily be
practically infeasible, as already discussed in this thread.

Of course, going through the man pages to find the right knob is always
the best option for those who have the time, but having a "global knob",
to help the users a bit, if possible, in general shouldn't hurt.

I hope it all makes more sense now.  Please, let me know if further
clarification is required.

Additionally, the way I envisioned it could also be combined with the
first option for the "global knob" that you listed above, as an additional
option for it to "force" the advices to be displayed, in addition to the
ability to disable all advices.

The current iteration for this series looks like it will be merged to
'next' soon.  In my opinion, it is a good stop for this series, and
maybe we can explore that 'global' knob in a new one.

I agree, the "global knob" can be added later, if we decide so.

Thank you for your interest in making this series better.

Thank you for your work on the patches!




[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