Fix: Follow symlinks correctly to the source file in the working tree.
Fix: Follow symlinks correctly to the source file in the working tree.

Issue:

  Consider a repository cloned to

    "/home/projects/myproject".

  Create a link

    ln -s /home/projects/myproject /home/projects/link

  Open sublime_text /home/projects/link/any_file.py

  GitGutter shows the file as 'inserted'.

Reason:

  The path of the file relative to the working tree root is created with the
  bare file name got from Sublime Text while the working tree root path was
  created with 'os.path.realpath()'.

  The resulting relative path to the file is:

    ../link/any_file.py

  what is not a file git would find in its database.

Solution:

  Use the real path for both, working tree and relative file path creation.

jisaacks/GitGutter