     @subscriptions = new CompositeDisposable()
     @decorations = {}
     @markers = []
-    @indexWatch = null
     @timeoutId = @repository = @editor = null
 
   dispose: =>
     @cancelUpdate()
     @removeDecorations()
-    @indexWatch?.close()
     @subscriptions?.dispose()
     @reset()
 

      @addIndexWatch()

  addIndexWatch: ->
    @indexWatch?.close()
    @indexWatch = fs.watch join(@repository.getPath(), 'index'), =>
      # atom/git-utils Repository does not always detect index changes
      # ... let others know (e.g. tree-view)
      @repository?.refreshStatus()
      @scheduleUpdate()
      @addIndexWatch()

  cancelUpdate: ->
    clearTimeout(@timeoutId)

{watchPath} = require('atom')
{join} = require 'path'
{Directory, CompositeDisposable} = require 'atom'
{repositoryForPath} = require './helpers'
