Re: [PATCH/RFC] checkout: print something when checking out paths
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 19, 2018, 13:08 UTC
- Message-ID
- <8736rx1ah9.fsf@evledraar.gmail.com>
- In-Reply-To
- <CACsJy8BGgf0J=iKNc3qmz_rTMNdaPmR_1v+9i3nhGKcuOH4AFA@mail.gmail.com>
On Mon, Nov 12 2018, Duy Nguyen wrote:
Show 21 quoted lines
> On Mon, Nov 12, 2018 at 7:21 AM Junio C Hamano <gitster@pobox.com> wrote: >> >> Nguyễn Thái Ngọc Duy <pclouds@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?