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

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

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jul 28, 2019, 22:49 UTC
Message-ID
<20190728224943.GC162590@genre.crustytoothpaste.net>
In-Reply-To
<e3f296a6-f33b-7b52-c4cb-9acf65145e64@yadavpratyush.com>
On 2019-07-28 at 22:10:29, Pratyush Yadav wrote:
Show 12 quoted lines
> 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:
> 
> /usr/lib/git-core/git-rev-parse --verify HEAD
> /usr/lib/git-core/git-update-index -q --unmerged --ignore-missing --refresh
> 
> Since I'm not too familiar with the details of these, I'll let you be the
> judge on how expensive these operations are. But I'll add that rescans are
> pretty fast on my relatively slow hard disk.

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.

Show 7 quoted lines
> ui_do_rescan changes the focus to the first diff. It is executed when you
> press F5 or choose Rescan from the menu. do_rescan does not do that.
> 
> Resetting to first diff on focus change will get annoying when you are in
> the middle of looking at some other file. do_rescan just updates the
> software state without changing what file you are looking at or where in
> that file you are looking at.
Yeah, this definitely seems like the right move.
> I'm never too sure what I should put in the commit message, so I took the
> conservative route. I'll add more details in the v2 patch.

Great. This sounds like a well-reasoned change. I'll let other folks who use git-gui more chime in to see what they think as well.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Pratyush YadavNext: Mark Levedahl
Message 5 of 23 in “git-gui: Perform rescan on window focus-in”
  1. git-gui: Perform rescan on window focus-inPratyush Yadav, Jul 28, 2019
  2. brian m. carlsonJul 28, 2019
  3. Pratyush YadavJul 28, 2019
  4. Pratyush YadavJul 28, 2019
  5. brian m. carlsonJul 28, 2019
  6. Mark LevedahlJul 29, 2019
  7. Mark LevedahlJul 29, 2019
  8. Pratyush YadavJul 29, 2019
  9. Johannes SchindelinJul 31, 2019
  10. Pratyush YadavAug 1, 2019
  11. Johannes SchindelinAug 2, 2019
  12. Pratyush YadavAug 2, 2019
  13. Johannes SchindelinAug 3, 2019
  14. Pratyush YadavAug 4, 2019
  15. Johannes SchindelinAug 4, 2019
  16. Pratyush YadavAug 4, 2019
  17. Junio C HamanoAug 2, 2019
  18. Pratyush YadavAug 2, 2019
  19. Johannes SchindelinAug 4, 2019
  20. Mark LevedahlJul 29, 2019
  21. Junio C HamanoJul 29, 2019
  22. Pratyush YadavJul 29, 2019
  23. Pratyush YadavJul 28, 2019

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.