![]() 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 |
||
---|---|---|
.. | ||
artifacts | ||
badges | ||
blame | ||
blob | ||
branches | ||
builds | ||
buttons | ||
ci/builds | ||
commit | ||
commits | ||
compare | ||
deploy_keys | ||
diffs | ||
find_file | ||
forks | ||
generic_commit_statuses | ||
graphs | ||
group_links | ||
hooks | ||
imports | ||
issues | ||
labels | ||
merge_requests | ||
milestones | ||
network | ||
notes | ||
project_members | ||
protected_branches | ||
refs | ||
releases | ||
repositories | ||
runners | ||
services | ||
snippets | ||
tags | ||
tree | ||
triggers | ||
variables | ||
wikis | ||
_activity.html.haml | ||
_bitbucket_import_modal.html.haml | ||
_builds_settings.html.haml | ||
_commit_button.html.haml | ||
_errors.html.haml | ||
_files.html.haml | ||
_find_file_link.html.haml | ||
_github_import_modal.html.haml | ||
_gitlab_import_modal.html.haml | ||
_home_panel.html.haml | ||
_last_commit.html.haml | ||
_last_push.html.haml | ||
_md_preview.html.haml | ||
_readme.html.haml | ||
_zen.html.haml | ||
activity.html.haml | ||
edit.html.haml | ||
empty.html.haml | ||
new.html.haml | ||
no_repo.html.haml | ||
remove_fork.js.haml | ||
show.atom.builder | ||
show.html.haml | ||
transfer.js.haml | ||
update.js.haml |