提交 a807a515 编写于 作者: J Joao Moreno

fixes #26642

上级 09e22b85
...@@ -597,12 +597,13 @@ export class Model implements Disposable { ...@@ -597,12 +597,13 @@ export class Model implements Disposable {
const repositoryRoot = await this._git.getRepositoryRoot(this.workspaceRoot.fsPath); const repositoryRoot = await this._git.getRepositoryRoot(this.workspaceRoot.fsPath);
this.repository = this._git.open(repositoryRoot); this.repository = this._git.open(repositoryRoot);
const onGitChange = filterEvent(this.onWorkspaceChange, uri => /\/\.git\//.test(uri.fsPath)); const onGitChange = filterEvent(this.onWorkspaceChange, uri => /\/\.git\//.test(uri.path));
const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.fsPath)); const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.path));
onRelevantGitChange(this.onFSChange, this, disposables); onRelevantGitChange(this.onFSChange, this, disposables);
onRelevantGitChange(this._onDidChangeRepository.fire, this._onDidChangeRepository, disposables); onRelevantGitChange(this._onDidChangeRepository.fire, this._onDidChangeRepository, disposables);
const onNonGitChange = filterEvent(this.onWorkspaceChange, uri => !/\/\.git\//.test(uri.fsPath)); const onNonGitChange = filterEvent(this.onWorkspaceChange, uri => !/\/\.git\//.test(uri.path));
onNonGitChange(this.onFSChange, this, disposables); onNonGitChange(this.onFSChange, this, disposables);
this.repositoryDisposable = combinedDisposable(disposables); this.repositoryDisposable = combinedDisposable(disposables);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册