gitlab-org--gitlab-foss/app/views/projects
Rémy Coutable bfc6a0e371 Merge branch 'gitattributes' into 'master'
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
2016-04-29 12:40:13 +00:00
..
artifacts
badges
blame
blob Properly handle bigger files 2016-04-28 21:28:39 +02:00
branches
builds
buttons
ci/builds
commit Fix error on commit builds page when no builds yet 2016-04-25 17:19:57 +02:00
commits
compare
deploy_keys Updated tests for deploy keys 2016-04-25 17:45:05 +01:00
diffs Support supressing text file diffs on the default branch with .gitattributes 2016-04-29 12:45:15 +01:00
find_file
forks
generic_commit_statuses
graphs
group_links Fixed failing tests 2016-04-25 16:56:17 +01:00
hooks Project webhooks updated UI 2016-04-26 10:56:18 +01:00
imports
issues Load the "New Branch" button asynchronously 2016-04-28 16:13:48 -04:00
labels
merge_requests Hide whitespace toggle button for new merge requests 2016-04-26 14:01:40 -05:00
milestones Use a better message when milestone is newly created 2016-04-29 10:15:49 +01:00
network
notes
project_members Use the `can?` helper instead of `current_user.can?` 2016-04-22 15:48:58 +02:00
protected_branches Protected branches UI 2016-04-26 15:50:31 +01:00
refs
releases
repositories
runners
services
snippets
tags
tree
triggers Updated triggers UI 2016-04-27 14:07:11 +01:00
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