stop symlink check once the top of the working tree is reached
authorJoey Hess <joeyh@joeyh.name>
Fri, 7 Aug 2020 00:14:30 +0000 (20:14 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 7 Aug 2020 00:14:30 +0000 (20:14 -0400)
commit506ffea5e6a69e831680f0778c3f65cc07766cb5
tree3773ba3d9af138cdba261472cb8ac8c53dbb9ba5
parenta358eb1faaa446f1e4e72c617390ccf383e9a210
stop symlink check once the top of the working tree is reached

Avoid complaining that a file with "is beyond a symbolic link" when the
filepath is absolute and the symlink in question is not actually inside the
git repository.

This assumes that inodes remain stable while the command is running.
I think they always will, the filesystems where they are unstable change
them across mounts. (If inodes were not stable, it would just complain about
symlinks in the path that are not inside the working tree.)

(On windows, I don't want to assume anything about inodes, they could be
random numbers for all I know. But if they were, this would still be ok, as
long as windows doesn't have symlinks that are detected by isSymbolicLink.
Which seems a fair bet.)
CHANGELOG
CmdLine/Seek.hs
doc/bugs/__39__Beyond_symbolic__39___link_error_when_link_is_upstream_of_repo.mdwn
doc/bugs/__39__Beyond_symbolic__39___link_error_when_link_is_upstream_of_repo/comment_3_9ac6e3436ab4866993ebf4e469b13636._comment [new file with mode: 0644]