New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitStatusMonitor: Display when inactive #8687
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8687 +/- ##
==========================================
- Coverage 55.80% 55.75% -0.06%
==========================================
Files 896 896
Lines 64896 64916 +20
Branches 11706 11712 +6
==========================================
- Hits 36214 36192 -22
- Misses 25870 25896 +26
- Partials 2812 2828 +16
Flags with carried forward coverage won't be shown. Click here to find out more. |
@gitextensions/git-extensions-team comments (especially) on the functionality change? |
@msftbot merge in 72 hours |
If someone is deeply concerned they have 72 hours to voice their concerns. If not, we can revisit this later. |
That is what I believe as well. Try to avoid rework, but it is better to go forward if in doubt |
If GE is minimized or a command is locking the repo, the status is not updated, the current status was kept without any indication. This sets the status as "gray" instead. Update is scheduled immediately after running again.
This will speed up subsequent git-status If Commit button is pressed while still gray there may be a conflict though.
ea4744f
to
3bcc979
Compare
Proposed changes
Display when the commit count is inactive or not yet updated.
Currently the status is shown as zero changes or shown the changes before for instance Commit or minimize.
Update is scheduled immediately after running again.
@mstv has asked about about status being incorrect, for instance when committing.
The modal dialog ("lock the repo") could still keep GitStatusMonitor active, even if I believe I prefer this.
--
A slightly separate change that builds on the change above, could be separated
@pmiossec asked about this
Run first update with locks
GitStatusMonitor normally do not try to lock the git-status, to not interfere with Commit.
However, a lock will speed up subsequent git-status.
If for instance you are building while opening GE, a lot of file changed events will fire
and git-status will run as often as allowed (max 1/3 of the time, but git-status can take some seconds).
If Commit button is pressed while still gray there may be a conflict though.
(But next FormCommit git-status should be faster.)
Screenshots
Before
Shown while operations like Commit are ongoing
Shown after a repo is opened, before status is available
After
Until git-status has run
Test methodology
At work with Symantec virus git-status may require 10s (at least the initial updated.
On my PC at home, git-status requires about 200 ms for the GE repo. This change can be hard to see. To simulate a slow git-status execution, you may simulate a delay:
GitUI/CommandsDialogs/BrowseDialog/GitStatusMonitor.cs line 437
Thread.Delay(5000);
✒️ I contribute this code under The Developer Certificate of Origin.