diff --git a/src/git-repository-async.js b/src/git-repository-async.js index 614d18a26..2c86c129d 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -41,9 +41,9 @@ export default class GitRepositoryAsync { this.subscriptions.add(new Disposable(() => window.removeEventListener('focus', onWindowFocus))) } - const {project} = options + const {project, subscribeToBuffers} = options this.project = project - if (this.project) { + if (this.project && subscribeToBuffers) { this.project.getBuffers().forEach(buffer => this.subscribeToBuffer(buffer)) this.subscriptions.add(this.project.onDidAddBuffer(buffer => this.subscribeToBuffer(buffer))) } diff --git a/src/git-repository.coffee b/src/git-repository.coffee index 30cce92d0..5a0df6743 100644 --- a/src/git-repository.coffee +++ b/src/git-repository.coffee @@ -76,7 +76,14 @@ class GitRepository unless @repo? throw new Error("No Git repository found searching path: #{path}") - @async = GitRepositoryAsync.open(path, options) + asyncOptions = {} + for key, val of options + asyncOptions[key] = val + # GitRepository itself will handle these cases by manually calling through + # to the async repo. + asyncOptions.refreshOnWindowFocus = false + asyncOptions.subscribeToBuffers = false + @async = GitRepositoryAsync.open(path, asyncOptions) @statuses = {} @upstream = {ahead: 0, behind: 0}