   # This destroys any tasks and subscriptions and releases the underlying
   # libgit2 repository handle. This method is idempotent.
   destroy: ->
-    if @emitter?
-      @emitter.emit 'did-destroy'
-      @emitter.dispose()
-      @emitter = null
-
     if @statusTask?
       @statusTask.terminate()
       @statusTask = null


        resolve()

        unless statusesUnchanged
          @emitter.emit 'did-change-statuses'

    return Promise.all([asyncRefresh, syncRefresh])

{basename, join} = require 'path'

_ = require 'underscore-plus'
{Disposable, CompositeDisposable} = require 'event-kit'
fs = require 'fs-plus'
GitRepositoryAsync = require './git-repository-async'
GitUtils = require 'git-utils'
