     # Ignore eol of line differences on windows so that files checked in as
     # LF don't report every line modified when the text contains CRLF endings.
     options = ignoreEolWhitespace: process.platform is 'win32'
-    @getRepo().getLineDiffs(@relativize(path), text, options)
+    repo = @getRepo(path)
+    repo.getLineDiffs(repo.relativize(path), text, options)
 
   # Public: Returns the git configuration value specified by the key.
   getConfigValue: (key) -> @getRepo().getConfigValue(key)

# This class shouldn't be instantiated directly but instead by accessing the
# `atom.project` global and calling `getRepo()`. Note that this will only be
# available when the project is backed by a Git repository.
#
# ## Example
#

  # `refs/remotes`.  It also shortens the SHA-1 of a detached `HEAD` to 7
  # characters.
  #
  # path - An optional {String} path in the repository to get HEAD information
  #        about. Only needed if the repository contains submodules.
  #
  # Returns a {String}.
  getShortHead: (path) -> @getRepo(path).getShortHead()

  # Public: Restore the contents of a path in the working directory and index
  # to the version at `HEAD`.
