This commit is contained in:
Joao 2017-08-29 11:34:38 +02:00
parent c25c8d41e3
commit c39302ab88

View file

@ -375,9 +375,10 @@ export class Repository implements Disposable {
this.disposables.push(fsWatcher);
const onWorkspaceChange = anyEvent(fsWatcher.onDidChange, fsWatcher.onDidCreate, fsWatcher.onDidDelete);
onWorkspaceChange(this.onFSChange, this, this.disposables);
const onRepositoryChange = filterEvent(onWorkspaceChange, uri => !/^\.\./.test(path.relative(repository.root, uri.fsPath)));
onRepositoryChange(this.onFSChange, this, this.disposables);
const onGitChange = filterEvent(onWorkspaceChange, uri => /\/\.git\//.test(uri.path));
const onGitChange = filterEvent(onRepositoryChange, uri => /\/\.git\//.test(uri.path));
const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.path));
onRelevantGitChange(this._onDidChangeRepository.fire, this._onDidChangeRepository, this.disposables);