atom/git-diff

Symlinks within repository now breaking git-diff

lucascosti opened this issue · 3 comments

Prerequisites

Description

I have a repo that contain symlinks to other places within the same repo. eg

repo/
└── docs/
       ├── topics/
       └── InstallGuide/
               └── topics/ -> ../topics/

repo/docs/InstallGuide/topics is a symlink to repo/docs/topics.

If I open a file from within the symlinked directory (repo/docs/InstallGuide/topics), then git-diff line marking in the gutter for that file no longer works.

If I open the file from repo/docs/topics, git-diff line marking in the gutter does work.

I'm not sure when it started breaking, but I think it was after I installed 1.14.0. I don't think this is the same issue as #91, as this directory structure has been working fine with git-diff until this week.

Versions

OS is Fedora 24.

$ atom --version
Atom : 1.14.1
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0

$ apm --version
apm 1.15.3
npm 3.10.5
node 4.4.5 x64
python 2.7.13
git 2.7.4

@dirk-thomas is this potentially caused by the path resolution changes?

Yes, this could be related to atom/atom#13545 which changed the behavior of Project.resolvePath to not resolve symlinks. That method is used in several places under the hood, e.g. a TextEditor uses this too. I am not familiar with the git-diff package but it should be sufficient to resolve the symlink explicitly if it needs to.

This issue was moved to atom/atom#18001