bfc6a0e371
Support supressing text file diffs on the default branch with .gitattributes This change allows users to suppress diffs for text files by adding an entry to the `.gitattributes` file. To take effect the file present at the HEAD of the default branch. When rendering a diff, if the file is text according to the charlock holmes gem (via the `text?` method) but the file is not diffable according to the project repository, then a message is displayed stating that the diff was suppressed. ![image](/uploads/2e119b725875a301e30d9ad482e283b3/image.png) I looked into ways to do this using a `binary` flag as suggested by @stanhu in [this comment](https://gitlab.com/gitlab-org/gitlab-ce/issues/2315#note_4435454), however, there was no good way to seperate what was a real binary file from one that had been marked as not diffable in `.gitattributes`. Fixes and closes gitlab-org/gitlab-ce#2315. See merge request !3806 |
||
---|---|---|
.. | ||
ci | ||
concerns | ||
hooks | ||
members | ||
network | ||
project_services | ||
.gitkeep | ||
ability.rb | ||
abuse_report.rb | ||
appearance.rb | ||
application_setting.rb | ||
audit_event.rb | ||
blob.rb | ||
broadcast_message.rb | ||
commit.rb | ||
commit_range.rb | ||
commit_status.rb | ||
deploy_key.rb | ||
deploy_keys_project.rb | ||
email.rb | ||
event.rb | ||
external_issue.rb | ||
forked_project_link.rb | ||
generic_commit_status.rb | ||
global_label.rb | ||
global_milestone.rb | ||
group.rb | ||
identity.rb | ||
issue.rb | ||
jira_issue.rb | ||
key.rb | ||
label.rb | ||
label_link.rb | ||
lfs_object.rb | ||
lfs_objects_project.rb | ||
member.rb | ||
merge_request.rb | ||
merge_request_diff.rb | ||
milestone.rb | ||
namespace.rb | ||
note.rb | ||
notification_setting.rb | ||
oauth_access_token.rb | ||
personal_snippet.rb | ||
project.rb | ||
project_group_link.rb | ||
project_import_data.rb | ||
project_snippet.rb | ||
project_team.rb | ||
project_wiki.rb | ||
protected_branch.rb | ||
release.rb | ||
repository.rb | ||
security_event.rb | ||
sent_notification.rb | ||
service.rb | ||
snippet.rb | ||
spam_log.rb | ||
spam_report.rb | ||
subscription.rb | ||
todo.rb | ||
tree.rb | ||
user.rb | ||
users_star_project.rb | ||
wiki_page.rb |