Skip to content
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

Merged
4 commits merged into from Dec 25, 2020

Conversation

gerhardol
Copy link
Member

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.

  • When refreshing
  • After switching to a new repo
  • Minimizing GE, then activating
  • Open a modal dialog, like FormCommit

@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
image

Shown after a repo is opened, before status is available
image

After

Until git-status has run
image

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.

@ghost ghost assigned gerhardol Dec 19, 2020
@codecov
Copy link

codecov bot commented Dec 19, 2020

Codecov Report

Merging #8687 (3bcc979) into master (5dd2d77) will decrease coverage by 0.05%.
The diff coverage is 23.07%.

@@            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     
Flag Coverage Δ
production 42.71% <23.07%> (-0.07%) ⬇️
tests 94.93% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@gerhardol
Copy link
Member Author

@gitextensions/git-extensions-team comments (especially) on the functionality change?

@RussKie
Copy link
Member

RussKie commented Dec 22, 2020

@msftbot merge in 72 hours

@ghost ghost added the status: auto merge label Dec 22, 2020
@gitextensions gitextensions deleted a comment Dec 22, 2020
@RussKie
Copy link
Member

RussKie commented Dec 22, 2020

If someone is deeply concerned they have 72 hours to voice their concerns. If not, we can revisit this later.
Thank you.

@gerhardol
Copy link
Member Author

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
Since it was a functionality change I do not mind a few days extra to merge
This time mstv and pmiossec had raised comments, so I wanted them to join.
Will squash fixup! and rebase tomorrow or so.

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.
@ghost ghost merged commit e7f66d8 into gitextensions:master Dec 25, 2020
@ghost ghost added this to the 4.0 milestone Dec 25, 2020
@gerhardol gerhardol deleted the feature/gitstatus-inactive branch November 14, 2021 13:01
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants