Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-04 Thread Pratyush Yadav
Hi Johannes, I sense that I'm starting to test your patience. So first off, thanks for the advice you've given so far. It has been really valuable. Feel free to let me know if you don't want me to prod you further about this, and I'll stop :). Also let me know if you don't want me to cc you

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-04 Thread Johannes Schindelin
Hi, On Sun, 4 Aug 2019, Pratyush Yadav wrote: > On 8/4/19 2:04 AM, Johannes Schindelin wrote: > > > > On Sat, 3 Aug 2019, Pratyush Yadav wrote: > > > > > On 8/2/19 6:09 PM, Johannes Schindelin wrote: > > > > > > > > On Fri, 2 Aug 2019, Pratyush Yadav wrote: > > > > > > > > > On 8/1/19 1:12 AM, Jo

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-04 Thread Johannes Schindelin
Hi, On Sat, 3 Aug 2019, Pratyush Yadav wrote: > On 8/2/19 10:17 PM, Junio C Hamano wrote: > > Pratyush Yadav writes: > > > > > 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

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-04 Thread Pratyush Yadav
On 8/4/19 2:04 AM, Johannes Schindelin wrote: Hi, On Sat, 3 Aug 2019, Pratyush Yadav wrote: On 8/2/19 6:09 PM, Johannes Schindelin wrote: On Fri, 2 Aug 2019, Pratyush Yadav wrote: On 8/1/19 1:12 AM, Johannes Schindelin wrote: I would be _extremely_ cautious to base an argument on one par

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-03 Thread Johannes Schindelin
Hi, On Sat, 3 Aug 2019, Pratyush Yadav wrote: > On 8/2/19 6:09 PM, Johannes Schindelin wrote: > > > > On Fri, 2 Aug 2019, Pratyush Yadav wrote: > > > > > On 8/1/19 1:12 AM, Johannes Schindelin wrote: > > > > > > > > I would be _extremely_ cautious to base an argument on one > > > > particular set

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-02 Thread Pratyush Yadav
On 8/2/19 10:17 PM, Junio C Hamano wrote: Pratyush Yadav 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 f

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-02 Thread Pratyush Yadav
On 8/2/19 6:09 PM, Johannes Schindelin wrote: Hi, On Fri, 2 Aug 2019, Pratyush Yadav wrote: On 8/1/19 1:12 AM, Johannes Schindelin wrote: I would be _extremely_ cautious to base an argument on one particular setup, using on particular hardware with one particular OS and one particular reposi

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-02 Thread Junio C Hamano
Pratyush Yadav 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 o

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-02 Thread Johannes Schindelin
Hi, On Fri, 2 Aug 2019, Pratyush Yadav wrote: > On 8/1/19 1:12 AM, Johannes Schindelin wrote: > > > > I would be _extremely_ cautious to base an argument on one > > particular setup, using on particular hardware with one particular > > OS and one particular repository. > > > > Agreed. That's why

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-08-01 Thread Pratyush Yadav
+Junio On 8/1/19 1:12 AM, Johannes Schindelin wrote: Hi, On Mon, 29 Jul 2019, Pratyush Yadav wrote: On 29/07/19 7:58 AM, Mark Levedahl wrote: On 7/28/19 6:49 PM, brian m. carlson wrote:> On 2019-07-28 at 22:10:29, Pratyush Yadav wrote: The function is not documented, and I only started spel

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-31 Thread Johannes Schindelin
Hi, On Mon, 29 Jul 2019, Pratyush Yadav wrote: > On 29/07/19 7:58 AM, Mark Levedahl wrote: > > On 7/28/19 6:49 PM, brian m. carlson wrote:> On 2019-07-28 at > > 22:10:29, Pratyush Yadav wrote: > > > > The function is not documented, and I only started spelunking > > > > the code a couple days bac

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-29 Thread Pratyush Yadav
On 29/07/19 10:39 AM, Junio C Hamano wrote: "brian m. carlson" writes: These are probably pretty cheap on all but the largest repositories. I was worried we were enumerating all refs or all history or something like that. ui_do_rescan changes the focus to the first diff. It is executed when

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-29 Thread Pratyush Yadav
On 29/07/19 7:58 AM, Mark Levedahl wrote: On 7/28/19 6:49 PM, brian m. carlson wrote:> On 2019-07-28 at 22:10:29, Pratyush Yadav wrote: >> The function is not documented, and I only started spelunking the code a >> couple days back, so I'll try to answer with what I know. It might not be >>

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread Junio C Hamano
"brian m. carlson" writes: > These are probably pretty cheap on all but the largest repositories. I > was worried we were enumerating all refs or all history or something > like that. > >> ui_do_rescan changes the focus to the first diff. It is executed when you >> press F5 or choose Rescan from

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread Mark Levedahl
On 7/28/19 6:49 PM, brian m. carlson wrote:> On 2019-07-28 at 22:10:29, Pratyush Yadav wrote: >> The function is not documented, and I only started spelunking the code a >> couple days back, so I'll try to answer with what I know. It might not be >> the full picture. >> >> Running git-gui --tra

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread Mark Levedahl
On 7/28/19 6:49 PM, brian m. carlson wrote:> On 2019-07-28 at 22:10:29, Pratyush Yadav wrote: >> The function is not documented, and I only started spelunking the code a >> couple days back, so I'll try to answer with what I know. It might not be >> the full picture. >> >> Running git-gui --tra

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread Mark Levedahl
On 7/28/19 6:49 PM, brian m. carlson wrote:> On 2019-07-28 at 22:10:29, Pratyush Yadav wrote: >> The function is not documented, and I only started spelunking the code a >> couple days back, so I'll try to answer with what I know. It might not be >> the full picture. >> >> Running git-gui --tra

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread brian m. carlson
On 2019-07-28 at 22:10:29, Pratyush Yadav wrote: > The function is not documented, and I only started spelunking the code a > couple days back, so I'll try to answer with what I know. It might not be > the full picture. > > Running git-gui --trace, these commands are executed during a rescan: > >

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread Pratyush Yadav
On 29/07/19 3:40 AM, Pratyush Yadav wrote: Hi Brian, On 29/07/19 3:06 AM, brian m. carlson wrote: On 2019-07-28 at 15:17:26, Pratyush Yadav wrote: If any changes are made to the tree while git-gui is open, the user has to manually rescan to see those changes in the gui. With this change, a res

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread Pratyush Yadav
Hi Brian, On 29/07/19 3:06 AM, brian m. carlson wrote: On 2019-07-28 at 15:17:26, Pratyush Yadav wrote: If any changes are made to the tree while git-gui is open, the user has to manually rescan to see those changes in the gui. With this change, a rescan will be performed whenever the window co

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread Pratyush Yadav
Playing with it for some time, I see some problems with the patch. Firstly, "bind ." binds that event for the root window and all subwindows. This means we rescan multiple times on a single FocusIn event, once for every window. This can be fixed easily with a check for the root window (aka "."

Re: [PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread brian m. carlson
On 2019-07-28 at 15:17:26, Pratyush Yadav wrote: > If any changes are made to the tree while git-gui is open, the user has > to manually rescan to see those changes in the gui. With this change, a > rescan will be performed whenever the window comes in focus, removing > the need for manual rescans

[PATCH] git-gui: Perform rescan on window focus-in

2019-07-28 Thread Pratyush Yadav
If any changes are made to the tree while git-gui is open, the user has to manually rescan to see those changes in the gui. With this change, a rescan will be performed whenever the window comes in focus, removing the need for manual rescans in most cases. A manual rescan will still be needed when