Class GitRepositoryProvider

Constructors

Properties

allRepoStorageKey: "theia-git-all-repositories" = 'theia-git-all-repositories'
commitMessageValidator: GitCommitMessageValidator
fileService: FileService
git: Git
lazyRefresh: (() => undefined | Promise<void>) = ...

Type declaration

    • (): undefined | Promise<void>
    • Returns undefined | Promise<void>

onDidChangeRepositoryEmitter: Emitter<undefined | Repository> = ...
scmProviderFactory: git.Factory
scmService: ScmService
selectedRepoStorageKey: "theia-git-selected-repository" = 'theia-git-selected-repository'
storageService: StorageService
workspaceService: WorkspaceService

Accessors

  • get selectedRepository(): undefined | Repository
  • Returns with the previously selected repository, or if no repository has been selected yet, it picks the first available repository from the backend and sets it as the selected one and returns with that. If no repositories are available, returns undefined.

    Returns undefined | Repository

  • set selectedRepository(repository): void
  • Sets the selected repository, but do nothing if the given repository is not a Git repository registered with the SCM service. We must be sure not to clear the selection if the selected repository is managed by an SCM other than Git.

    Parameters

    Returns void

Methods