Loading
feat: Update branch immediately when state changes
Description
This changes the behavior of the CurrentBranchRefresher to immediately perform a refresh when the branch changes in the local Git repository. The polling system that reads the Git repository state every second has been removed.
This makes use of an event in VS Code's Git plugin, which does a file watch on the .git folder. This ensures the event is called regardless of the Git command being issued from VS Code or an unrelated external tool.
This also changes the Sidebar to show a new type of indicator if the branch is being switched. In cases where the request takes several seconds to finish, this will immediately show feedback to the user and avoid presenting stale information (related to the other branch).
How has this been tested?
- Open a Git project
- Wait for the "For Current Branch" sidebar panel to be populated
- Change the branch, either through a VS Code command or by typing
git checkout - The sidebar will immediately change to say "Switching Branches" with a loading indicator.
-
If
src/browserorsrc/commonhas been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE. - Consider an end-to-end test for significant new features that aren't covered by integration tests.
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:Bug fix fixes - a user-facing issue in production - included in changelog -
feature:New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog - None - other non-user-facing changes