   #
   # Returns a promise that resolves when the repository has been refreshed.
   refreshStatus: ->
-    asyncRefresh = @async.refreshStatus().then =>
-      @statusesByPath = {}
-      @branch = @async?.branch
-
+    asyncRefresh = @async.refreshStatus()
     syncRefresh = new Promise (resolve, reject) =>
       @handlerPath ?= require.resolve('./repository-status-handler')
 

    @getCachedRelativePathStatus(relativePath)

  getCachedRelativePathStatus: (relativePath) ->
    cachedStatus = @statusesByPath[relativePath]
    return cachedStatus if cachedStatus?

    @async.getCachedPathStatuses()[relativePath]

  # Public: Returns true if the given status indicates modification.
  #

  #
  # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.
  onDidChangeStatuses: (callback) ->
    @async.onDidChangeStatuses =>
      @branch = @async?.branch
      @statusesByPath = {}
      callback()

  ###
  Section: Repository Details
