Re: [PATCH] git-gui: Perform rescan on window focus-in
- From
Pratyush Yadav <me@yadavpratyush.com>
- Date
- Aug 2, 2019, 20:13 UTC
- Message-ID
- <a143dcfd-8067-34f7-97f3-c4482dca5819@yadavpratyush.com>
- In-Reply-To
- <xmqqftmjldjx.fsf@gitster-ct.c.googlers.com>
On 8/2/19 10:17 PM, Junio C Hamano wrote:
Show 23 quoted lines
> Pratyush Yadav <me@yadavpratyush.com> writes: > >> +Junio > > I do not have a strong opinion on this one---a Meh by default means > a moderately strong preference for status-quo. > >> All right, the patch in its current state can't fly. So what is the >> correct way to do this? I see the following options: >> >> 1. Add this as an option that is disabled by default, but people who >> don't mind it can enable it. This is the easiest to implement. But I >> leave it to you and Junio (and anyone else who wants to pitch in :)) >> to decide if it is a good idea. > > I think this is a good first step. As I said already, I am not > convinced that "focus in" is a good heuristics for triggering auto > rescan, and I suspect that you or others may come up with and > replace it with a better heuristic over time. During that > experiment, it would be better to allow interested others to opt > into the feature to help, while not disturbing ordinary users who > are OK with the current behaviour. >
All right. I'll look a bit more to see if I can figure something better. I suggested using filesystem watches. I'll wait a bit to hear from Johannes on what he thinks about it. He doesn't like the idea of using Watchman apparently.
Otherwise, I'll send in an updated patch with this feature as opt-in.
-- Regards, Pratyush Yadav