   # * path:
   #   The String path to check
   #
-  # Returns a {Boolean}.
+  # Returns a Boolean.
   isSubmodule: (path) -> @getRepo().isSubmodule(@relativize(path))
 
   # Public: Retrieves the status of a directory.

  # can be an array of strings containing the reference names.
  getReferences: -> @getRepo().getReferences()

  # Public: ?
  getAheadBehindCount: (reference) -> @getRepo().getAheadBehindCount(reference)

  # Public: ?
  hasBranch: (branch) -> @getReferenceTarget("refs/heads/#{branch}")?

  # Private:
  refreshStatus: ->
    @statusTask = Task.once require.resolve('./repository-status-handler'), @getPath(), ({statuses, upstream, branch}) =>
      statusesUnchanged = _.isEqual(statuses, @statuses) and _.isEqual(upstream, @upstream) and _.isEqual(branch, @branch)

      @emit 'status-changed', path, pathStatus
    pathStatus

  # Public: Returns true if the given path is ignored.
  isPathIgnored: (path) -> @getRepo().isIgnored(@relativize(path))

  # Public: Returns true if the given status indicates modification.
  isStatusModified: (status) -> @getRepo().isStatusModified(status)

  # Public: Returns true if the given path is modified.
  isPathModified: (path) -> @isStatusModified(@getPathStatus(path))

  # Public: Returns true if the given status indicates a new path.
  isStatusNew: (status) -> @getRepo().isStatusNew(status)

  # Public: Returns true if the given path is new.
  isPathNew: (path) -> @isStatusNew(@getPathStatus(path))

  # Public: Returns true if at the root, false if in a subfolder of the
  # repository.
  isProjectAtRoot: ->
    @projectAtRoot ?= project.relativize(@getWorkingDirectory()) is ''

