Repository navigation
Do not traverse symlinks in heuristics - #3946
Merged
Merged
Conversation
kivikakk
added a commit
to github/markup
that referenced
this pull request
Dec 12, 2017
This was referenced Dec 12, 2017
lildude
reviewed
Jan 2, 2018
| def symlink? | ||
| return @symlink if [email protected]? | ||
| @symlink = (File.symlink?(@fullpath) rescue false) | ||
| end |
Member
There was a problem hiding this comment.
@kivikakk I just noticed this is reporting a bunch of warnings in the tests: https://travis-ci.org/github/linguist/jobs/323823193
/home/travis/build/github/linguist/lib/linguist/file_blob.rb:30: warning: instance variable @symlink not initialized
/home/travis/build/github/linguist/lib/linguist/file_blob.rb:30: warning: instance variable @symlink not initialized
/home/travis/build/github/linguist/lib/linguist/file_blob.rb:30: warning: instance variable @symlink not initialized
/home/travis/build/github/linguist/lib/linguist/file_blob.rb:30: warning: instance variable @symlink not initialized
They're not failures hence we missed this before, but I think it'd be best to clean these up.
Member
There was a problem hiding this comment.
I've also just realised this PR didn't intro any tests to verify the symlink behaviour. Sorry I missed this before.
Contributor
Author
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part of what should be a correct fix for github/markup#1133. Changes are required in
markupitself and dotcom to pass the symlink info through from the repository.