On Mon, Nov 12 2018, Duy Nguyen wrote:

> On Mon, Nov 12, 2018 at 7:21 AM Junio C Hamano <gits...@pobox.com> wrote:
>>
>> Nguyễn Thái Ngọc Duy  <pclo...@gmail.com> writes:
>>
>> > Since the purpose of printing this is to help disambiguate. Only do it
>> > when "--" is missing (the actual reason though is many tests check
>> > empty stderr to see that no error is raised and I'm too lazy to fix
>> > all the test cases).
>>
>> Heh, honesty is good but in this particular case the official reason
>> alone would make perfect sense, too ;-)
>>
>> As with progress output, shouldn't this automatically be turned off
>> when the standard error stream goes to non tty, as the real purpose
>> of printing is to help the user sitting in front of the terminal and
>> interacting with the command?
>
> I see this at the same level as "Switched to branch 'foo'" which is
> also protected by opts->quiet. If we start hiding messages based on
> tty it should be done for other messages in update_refs_for_switch()
> too, I guess?

I have no real opinion either way, but whatever we can do about
"checkout" being so confusing since it does so many things is most
welcome.

Just an alternative: Maybe we can start this out as advice() output
that's either opt-in via config (not on by default) to start with, or
have some advice_tty() that only emits it in the same circumstances we
emit the progress output?

Reply via email to