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

[git] Selected git repository does not get updated on repository deletion #927

Closed
kittaakos opened this issue Dec 1, 2017 · 7 comments
Closed
Labels
bug bugs found in the application git issues related to git

Comments

@kittaakos
Copy link
Contributor

This is a follow up of #899.

Let assume you have repository A, B in your workspace and repository A is selected in the drop-down in the Git tab. Lose the focus from the Git tab (select Files or you name it), delete repository A outside from Theia. Activate the Git tab, repository A is still selected as the active one.

Expected:
B should be selected, A should not be among the repositories.

This glitch does not cause any problem, the git watcher was gracefully disposed. One has to refresh the view manually.

@kittaakos kittaakos added the git issues related to git label Dec 1, 2017
@kittaakos kittaakos self-assigned this Dec 1, 2017
@kittaakos
Copy link
Contributor Author

This could be invalid after #1091. I look into this task.

@kittaakos
Copy link
Contributor Author

kittaakos commented Jan 26, 2018

I can confirm, the issue is still present. The frontend does not receive any notification if the repository gets removed from the workspace. The active repository is still the deleted one. It used to work before #899.

@kittaakos
Copy link
Contributor Author

It used to work before #899.

No. Way before this... I think it never made it to the master. See the removal here.

@kittaakos
Copy link
Contributor Author

@svenefftinge, @akosyakov; shall we treat this behavior as a bug or a missing feature?

I would expect that the UI (frontend state) gets updated after a repository deletion but adding this could be costly performance wise. We could detect if a .git folder was deleted from the WS, but that point we cannot check whether it was a repository or not. So we would need to maintain some state on the backend.

@svenefftinge
Copy link
Contributor

We can categorize it as a bug. Low priority, though, because it doesn't have bad implications and is a rare corner-case.

@westbury
Copy link
Contributor

I've just tested this with PR #3831 and it appears to be fixed. Delete repository A and I see the Git view and the status bar indicator automatically switch to repository B.

@vince-fugnitto
Copy link
Member

I've just tested this with PR #3831 and it appears to be fixed. Delete repository A and I see the Git view and the status bar indicator automatically switch to repository B.

I tested it as well and it works correctly.

I started with a workspace that contained the folders a, b which each had repositories.
When starting the app we get the first repo a. If a is deleted from outside of the app, the SCM widget and corresponding repo statusbar item is updated to b.

I'll close the issue as it's been resolved, and will re-open it in the future if the problem returns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application git issues related to git
Projects
None yet
Development

No branches or pull requests

4 participants