git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] git-gui: Auto-rescan on activate

From
Pratyush Yadav <me@yadavpratyush.com>
Date
Dec 17, 2020, 20:10 UTC
Message-ID
<20201217201051.am33p6h2xu6wq34s@yadavpratyush.com>
In-Reply-To
<e5f6753b-10b3-1291-1b39-34af63792037@kdbg.org>
Hi,
On 17/12/20 08:45PM, Johannes Sixt wrote:
Show 20 quoted lines
> Am 01.11.20 um 18:05 schrieb Stefan Haller:
> > Do an automatic rescan whenever the git-gui window receives focus. Most other
> > GUI tools do this, and it's very convenient; no more pressing F5 manually.
> > 
> > People who don't like this behavior can turn it off using
> > "git config gui.autorescan false".
> > 
> > Stefan Haller (2):
> >   git-gui: Delay rescan until idle time
> >   git-gui: Auto-rescan on activate
> > 
> >  git-gui.sh | 26 ++++++++++++++++++++++----
> >  1 file changed, 22 insertions(+), 4 deletions(-)
> > 
> 
> I've been using these patches in the past days.
> 
> I am still a bit ambivalent on whether I like the behavior. I do switch
> among windows *a lot* and there is a short flicker on every rescan. And
> there is muscle memory...
This is part of the reason I am a little uneasy enabling it by default, 
and why I insist on having a loud and clear warning to the users about 
what is going on.
 
Show 7 quoted lines
> I observe a bug and a half:
> 
> It is unclear which file is selected automatically when there are
> unstaged changes. But there is one misbehavior: after I have invoked the
> merge tool, resolved the conflict, and then switch back to Git GUI, the
> conflicted file is not selected anymore when it is not the first file in
> the list. That is *very* annoying.
Haven't had a chance to try this out yet but AFAIK the last file should 
be correctly remembered. See below.
 
Show 6 quoted lines
> And then there is the following use-case. While Git GUI is not active
> (think Git GUI and Gitk side-by-side and Gitk active), I click on a
> particular file that is not at the top of the list; then Git GUI becomes
> active and rescans, but also forgets on which file I have clicked. But I
> expected the clicked-on file to become visible, which it doesn't, and I
> have to click again. This is mildly annoying.

Hmm, I don't see that on my system on Linux. The code to remember last open file is there in 'rescan_done'. So I don't understand why this becomes a problem on your system.

-- 
Regards,
Pratyush Yadav
Previous: Johannes SixtNext: Johannes Sixt
Message 18 of 21 in “git-gui: Auto-rescan on activate”
  1. 0/2 git-gui: Auto-rescan on activateStefan Haller, Nov 1, 2020
  2. 2/2 git-gui: Auto-rescan on activateStefan Haller, Nov 1, 2020
  3. Pratyush YadavNov 2, 2020
  4. Stefan HallerNov 2, 2020
  5. 1/2 git-gui: Delay rescan until idle timeStefan Haller, Nov 1, 2020
  6. Pratyush YadavNov 2, 2020
  7. Stefan HallerNov 2, 2020
  8. Pratyush YadavNov 2, 2020
  9. Stefan HallerNov 2, 2020
  10. 0/1 git-gui: Auto-rescan on activateStefan Haller, Nov 3, 2020
  11. 1/1 git-gui: Auto-rescan on activateStefan Haller, Nov 3, 2020
  12. Stefan HallerNov 14, 2020
  13. Pratyush YadavNov 17, 2020
  14. Stefan HallerNov 17, 2020
  15. Pratyush YadavNov 17, 2020
  16. Stefan HallerNov 18, 2020
  17. Johannes SixtDec 17, 2020
  18. Pratyush YadavDec 17, 2020
  19. Johannes SixtDec 17, 2020
  20. Stefan HallerDec 18, 2020
  21. Johannes SixtDec 18, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.