Re: [PATCH v3 3/3] reset: warn when refresh_index() takes more than 2 seconds
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 23, 2018, 00:23 UTC
- Message-ID
- <xmqqh8hdtsro.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20181022131828.21348-4-peartben@gmail.com>
Ben Peart <peartben@gmail.com> writes:
Show 6 quoted lines
> From: Ben Peart <benpeart@microsoft.com> > > refresh_index() is done after a reset command as an optimization. Because > it can be an expensive call, warn the user if it takes more than 2 seconds > and tell them how to avoid it using the --quiet command line option or > reset.quiet config setting.
I am moderately negative on this step. It will irritate users who know about and still choose not to use the "--quiet" option, because they want to gain performance in later real work and/or they want to know what paths are now dirty. A working tree that needs long time to refresh will take long time to instead do "cached stat info says it may be modified so let's run 'diff' for real---we may discover that there wasn't any change after all" when a "git diff" is run after a "reset --quiet" that does not refresh; i.e. there would be valid reasons to run "reset" without "--quiet".
It feels a bit irresponsible to throw an ad without informing pros-and-cons and to pretend that we are advising on BCP. In general, we do *not* advertise new features randomly like this.
Thanks. The previous two steps looks quite sensible.