Re: [PATCH] status: hint the user about -uno if read_directory takes too long
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 14, 2013, 15:05 UTC
- Message-ID
- <7vmwu6yqbd.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CACsJy8BixM-9bPB3G_WO+W3cTHBFxLQ=YCU2NDEzHmCYW73ZPQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 11 quoted lines
> On Wed, Mar 13, 2013 at 10:21 PM, Torsten Bögershausen <tboegi@web.de> wrote: >>> + statusUno:: >>> + If collecting untracked files in linkgit:git-status[1] >>> + takes more than 2 seconds, hint the user that the option >>> + `-uno` could be used to stop collecting untracked files. >> Thanks, I like the idea >> could we make a "de-Luxe" version where >> >> statusUno is an integer, counting in milliseconds? > > No problem.
A huge problem, as it breaks consistency and more importantly, the suggestion misses the entire point of what "advice.*" variables are.
"advise.*" variables are bools that indicate "Have I learned this somewhat tricky feature and/or characteristics of Git yet or do I still need a reminder?" There is no room for "I still need a reminder if it takes more than N seconds". You either already have got it, or you haven't.
Show 9 quoted lines
>> "to speed up by stopping displaying untracked files" does not look >> like giving a balanced suggestion. It is increasing the risk of >> forgetting about newly created files the user may want to add, but >> the risk is not properly warned. > > How about "It took X ms to collect untracked files.\nCheck out the > option -u for a potential speedup"? I deliberately hide "no" so that > the user cannot blindly type and run it without reading document > first. We can give full explanation and warning there in the document.
But it makes the advise much less useful to introduce more levels of indirections, no?