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

simplify scm/git data flow #5295

Closed
akosyakov opened this issue May 29, 2019 · 1 comment · Fixed by #5416
Closed

simplify scm/git data flow #5295

akosyakov opened this issue May 29, 2019 · 1 comment · Fixed by #5416
Assignees
Labels
git issues related to git quality issues related to code and application quality scm issues related to the source control manager

Comments

@akosyakov
Copy link
Member

akosyakov commented May 29, 2019

ScmService should be a single source of the whole scm state, git extension should populate it and provide git specific view instead of duplicating this state partially and trying to sync it.

For right now repositories state is duplicated several times:

  • GitContribution.dirtyResporitories duplicating GitRepositoryProvider.allRepositories which duplicating ScmService.repositories
  • GitRepositoryProvider.selectedRepository duplicating ScmService.selectedRepository

GitRepositoryProvider should be a git specific facade to ScmService. Handling of ScmProvider should be moved to GitRepositoryProvider instead of keeping allRepositories and GitContribution.dirtyResporitories.

@akosyakov akosyakov added git issues related to git quality issues related to code and application quality scm issues related to the source control manager labels May 29, 2019
@vinokurig vinokurig self-assigned this May 29, 2019
@akosyakov
Copy link
Member Author

akosyakov commented May 29, 2019

Also state of changes is duplicated in https://github.com/theia-ide/theia/blob/93fb9e74d9e807b539222fdc67d6b5a6663251f7/packages/git/src/browser/git-contribution.ts#L330 and in https://github.com/theia-ide/theia/blob/93fb9e74d9e807b539222fdc67d6b5a6663251f7/packages/git/src/browser/git-commands.ts#L76-L120

It should be computed only once before rendering and then rendering and git commands should work on exactly the same state.

Right now it could happen that SCM widget shows data for one state, but commands are performed on other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git issues related to git quality issues related to code and application quality scm issues related to the source control manager
Projects
None yet
2 participants