-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[git] the repo info in git view can't be updated when click the refresh button in some case #3800
Comments
Duplicate of #927. Please reopen if required. |
I don't think this issue is duplicate of #927. #927 have two git repositories, after deleting one of them, we can click the refresh button in git view to update the git view. In this issue, there has only one repository, after deleting the only repository, git view can't be updated even by clicking the refresh button manually. |
I was hoping this issue would be fixed by PR #3831. It almost is. After deleting the repository, the repository is no longer shown in the status bar. However I had to click away from the Git view and back before the view switched to show the orange box with "version control is not available at this time". |
As shown in the picture below, in 'initialize' function, if there has a repo, this.toDispose.dispose will be called, so onDidChangeRepository will be disposed. In this case, git-widget will not be able to listen to the onDidChangeRepository event. In 'initialize' function, if there has no repo, 'updateView ' shall also be called to update the view. |
This issue still exists in version 0.4.0 |
@zixuemeng Could you provide a PR? |
@vinokurig it is broken after merging SCM PR the original fix is here: e73566f#diff-dfd901ad320c23defbf3bbb075d307b9 but it is not applicable since the code changed much |
1.open a workspace which has one git repo
2.select git view tab
3.delete the repo folder in terminal
4.click the refresh button in git view
The deleted repo info is still shown in git view.
The text was updated successfully, but these errors were encountered: