New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.gitattributes linguist-vendored overrides not suppressing vendored files in diff #2206
Comments
I'm also seeing this and wondering the exact same thing. It seems related to #714 which was closed years ago. |
What's odd is that it seems like |
Hi @dougnukem thanks for the question. Unfortunately the diff suppression isn't customizable, it's handled by the
Also, incase it isn't obvious from this comment, this statement is unfortunately incorrect and we need to update the docs:
|
Thanks for the clarification @afron. So even without the https://github.com/github/linguist/blob/master/lib/linguist/generated.rb#L57 https://github.com/github/linguist/blob/master/lib/linguist/generated.rb#L235-L240
|
Yep, I would expect that to work. This is definitely going to need further investigation... |
Thanks for your help @arfon! |
@seanhealy this issue with the existing |
@arfon thank 👍 everything looks good now for Are there any plans to extend that to allow per repo configuration using |
We'd definitely like to do this but it's going to require significant engineering work on GitHub.com so I don't have a timeline sorry. |
From the REAMDE content:
So, having jQuery.throwable is an example where this feature would be useful. The diffs are suppressed for the commits in the After a discussion with @jdennes I pushed the content of this repository into one of my private test repositories and added the public_html/js/jquery.throwable.js linguist-vendored=false However, the diffs are still suppressed. Is there any alternative/workaround for this? If not, how to understand the quoted readme content? /cc @arfon |
Hi @IonicaBizau - I'm sorry for the confusion about this. Basically our docs are wrong here. :-\
Again, sorry for the confusion here. I'll open a PR to correct the docs. |
/ cc #2349 |
+1 for But more pain than that diffs are suppressed by default, is that when there are only suppressed diffs, the page layout is collapsed to 980px instead of being full width. This means that even if I manually click all suppressed diffs and open them, they usually have lots of wrapped lines which is unreadable in most circumstances. @arfon is there a possibility to do something about that? Like having full width layout for all diffs even if all are collapsed? Thanks. |
Possibly although I'm not really involved in product development stuff like that here at GitHub so if you have a feature request then please email
I hear you loud and clear on this 😄. I'd love to get this shipped. |
Hi @arfon, I wonder what's the status of this? |
Still a work in progress I'm afraid. |
Ok. I appreciate the update. Thanks for working on this! |
Also, I wonder if this will make into the enterprise version, and whether it's more effective for me to try to raise this issue in a different channel? |
@hsuzukiml - when we get this completed it should make it into GitHub Enterprise yes. It never hurts to email our Enterprise support teams to let them know this is a feature you'd like to see supported 😸 |
I tried using the |
No, I'm afraid that's currently not supported 😞 |
Is this still being worked on? I'm working on several javascript projects that are committing into packages/node_modules. It would be great not to deal with clicking "load diff" in every code review. |
Bizarrely this did seem to be working a couple of months ago (sorry I can't be more specific)... but now seems to no longer be working. For example: https://github.com/myitcv/react/pull/65/files everything under https://github.com/myitcv/react/blob/1307fd5c32ce8beb4698aadd0db53c33628e7dea/.gitattributes#L1 |
Did |
I started using reviewable.io which has gitattributes support. I mark
generated files as `-diff` which makes them binary and it's easy to skip
over them during a review. Github's review tools have not improved with
time, reviewable is ugly and complicated but does what you're looking for.
…On Wed, Jun 7, 2017 at 5:49 PM, Pete Lada ***@***.***> wrote:
Did linguist-generated diff suppression ever make it to github
enterprise? Trying to get it working on a project with lots of generated
files, but it doesn't seem to be working (tried after reading:
https://robots.thoughtbot.com/github-diff-supression)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2206 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAONwIN4TpCVt41BeFcAasW1W3xaQIhiks5sB0UOgaJpZM4Dqv4V>
.
|
@pklada it should have. Enterprise 2.10 was released this week so will offer very similar functionality as GitHub.com right now. I'm not sure off the top of my head when this was made available on GitHub but it may also be in 2.9 released on 1 March. You can hover your pointer over the octocat icon at the bottom of any page on your instance to determine the version you're running. |
^ ah okay awesome. We're still on 2.8, going to try again after upgrading. |
Ok, having re-read this thread, I'm a little confused as to what behaviour to expect on github.com (not enterprise) with respect to https://github.com/github/linguist/pull/2304/files (from back in 2015) added the following wording to the
But that wording no longer appears in So does that mean |
Nope. That section was incorrect when it was added to the readme and removed in #2714. To quote the PR OP:
... that is, they are not suppressed. |
@lildude - thanks for clarifying. To ask the perhaps obvious follow up question, given that |
Yup |
@lildude - thanks. Apologies, I mentally skipped anything to do with Nonetheless, that solution works well. |
Does |
@gluons Hmm, weird. According to this https://github.com/github/linguist#vendored-code everything in this file should be excluded automatically without you needing to add anything https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml so not sure why it's not working for you. Maybe raise an issue? |
@lukes OK. I'll try to adjust my repo again. If it still not work, I'll raise an issue. |
Don't confuse counting towards the language stats with having the language correctly identified and returned in the search results you get when clicking the language bar. The search results return all files idetified whilst the language stats only counts those it should. I've checked your repo and the dist files are not being included in the language stats calculation. |
@gluons, if it helps the JavaScript total comes from two files: |
@lildude Right! I'm going adjust to my |
@lildude How can I check it by myself? |
@gluons you'll need to install Linguist on your system and then check the repo using |
@lildude OK. 🙇 Thank you. I'll try. |
For the benefit of others scrolling through a rather long thread, using this in your
(please correct me if I have summarized poorly) |
To summarise, as of today, 25 Oct 2017:
All of this is detailed in the README.md so I think we can close this issue now. If you are not seeing this behaviour or it changes in future, please open a new issue. |
I've locked the conversation as it is already incredibly long and hard to follow and I'd prefer not to add more complexity if it can be avoided. A lot has changed in over 2 years so it's best to keep things "fresh". |
I'm trying to ensure that certain paths are suppressed in pull-request diffs and are treated as vendored files.
I setup a
.gitattributes
file specifying those paths aslinguist-vendored
as indicated here https://github.com/github/linguist#overrides"Vendored files are also hidden by default in diffs on github.com."
Then I created a pull-request that adds a file in
node_modules/
but I'm still seeing that file unsuppressed in the pull-request diff.Am I doing something wrong or misunderstanding the purpose of the
.gitattributes
linguist-vendored
?The text was updated successfully, but these errors were encountered: