 
   # Public: Gets all the local and remote references.
   #
-  # Returns an object with three keys: `heads`, `remotes`, and `tags`. Each key
-  # can be an array of strings containing the reference names.
+  # Returns an {Object} with the following keys:
+  #  :heads - An {Array} of head reference names.
+  #  :remotes - An {Array} of remote reference names.
+  #  :tags - An {Array} of tag reference names.
   getReferences: -> @getRepo().getReferences()
 
   # Public: Returns the number of commits behind the current branch is from the
-  # default remote branch.
+  # its upstream remote branch.
   getAheadBehindCount: (reference) -> @getRepo().getAheadBehindCount(reference)
 
   # Public: Returns true if the given branch exists.
   hasBranch: (branch) -> @getReferenceTarget("refs/heads/#{branch}")?
 
-  # Private: Refreshes the current git status in an outside process and
-  # asynchronously updates the relevant properties.
+  # Refreshes the current git status in an outside process and asynchronously
+  # updates the relevant properties.
   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)

  # This compares the working directory contents of the path to the `HEAD`
  # version.
  #
  # * path:
  #   The String path to check
  #
  # Returns an object with two keys, `added` and `deleted`. These will always
  # be greater than 0.
  getDiffStats: (path) -> @getRepo().getDiffStats(@relativize(path))

  # Public: Identifies if a path is a submodule.
  #
  # * path:
  #   The String path to check
  #
  # Returns a Boolean.
  isSubmodule: (path) -> @getRepo().isSubmodule(@relativize(path))

  # Public: Retrieves the status of a directory.
  #
  # * path:
  #   The String path to check
  #
  # Returns a Number representing the status.
  getDirectoryStatus: (directoryPath)  ->
    {sep} = require 'path'
    directoryPath = "#{directoryPath}#{sep}"


    @unsubscribe()

  # Returns the corresponding {Repository}
  getRepo: ->
    unless @repo?
      throw new Error("Repository has been destroyed")
    @repo

  # Reread the index to update any values that have changed since the
  # last time the index was read.
  refreshIndex: -> @getRepo().refreshIndex()

  # Public: Returns the {String} path of the repository.
  getPath: ->
    @path ?= fs.absolute(@getRepo().getPath())

  # Public: Returns the {String} working directory path of the repository.
  getWorkingDirectory: -> @getRepo().getWorkingDirectory()

  # Public: Get the status of a single path in the repository.
  #
  # path - A {String} repository-relative path.
  #
  # Returns a {Number} representing the status. This value can be passed to
  # {.isStatusModified} or {.isStatusNew} to get more information.
  getPathStatus: (path) ->
    currentPathStatus = @statuses[path] ? 0
    pathStatus = @getRepo().getStatus(@relativize(path)) ? 0
