-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Accept and encourage "minus-prefix" for unset gitattributes as per gitattributes documentation #4780
Conversation
ie this from the gitattributes docs: Unset The path has the attribute with special value "false"; this is specified by listing the name of the attribute prefixed with a dash `-` in the attribute list.
# README.md linguist-documentation=false | ||
# samples/Arduino/* linguist-documentation | ||
# samples/Markdown/*.md linguist-detectable=true | ||
# samples/HTML/*.html linguist-detectable=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The four lines above have been added to the .gitattributes
in the test branch but this side hasn't been update to reflect this, so I'm adding them as part of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of StackOverflow answers to update now 😄
@lildude friendly reminder to update https://help.github.com/en/github/administering-a-repository/customizing-how-changed-files-appear-on-github to use
(I haven't searched recently to see if there are other GitHub doc pages that need updating.) |
I'll let our docs team know. |
It seems that they forgot to change that in this place: |
Not really. It still works. Not sure what happened to me original issue. I'll see if I can find time to dig it up, but there's no urgency. |
Description
@cespare rightly pointed out in #4624 that we're being "special" by requiring people to use the
false
string to negate or unset a behaviour via.gitattributes
and really should accept and encourage the "minus-prefixed"-linguist-whatever
method for unsetting/negating.As per the gitattributes documentation:
@cespare got the ball rolling with updating the documentation and I've now implemented the necessary code changes in this PR for the negation to work. This covers both the gitattributes documented behaviour and our old
=false
behaviour so we don't catch anyone by surprise.The setting/enabling part already works so no changes on that side.
This PR needs the changes in #4779.
Checklist: