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: > > /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. > 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
Attachment:
signature.asc
Description: PGP signature