gitlab-org--gitlab-foss/spec
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
..
config
controllers Backport GitHub Enterprise import support from EE 2016-04-26 21:00:55 -07:00
factories Fix wiki tests 2016-04-20 08:25:41 +08:00
features Use a better message when milestone is newly created 2016-04-29 10:15:49 +01:00
finders Return unique issues when using multiple labels 2016-04-13 16:10:49 -04:00
fixtures
helpers Updated label links to work correctly for filtering 2016-04-26 09:13:03 +01:00
initializers
javascripts Placeholder on milestone form 2016-04-14 10:28:05 +01:00
lib Merge branch 'use-remote-ip-for-akismet' into 'master' 2016-04-28 13:09:44 +00:00
mailers Merge branch 'mr-formatting' into 'master' 2016-04-19 16:23:41 +00:00
models Support supressing text file diffs on the default branch with .gitattributes 2016-04-29 12:45:15 +01:00
requests Prevent users from deleting Webhooks via API they do not own 2016-04-24 23:53:59 -07:00
routing
services Support supressing text file diffs on the default branch with .gitattributes 2016-04-29 12:45:15 +01:00
support Merge branch 'pmq20/gitlab-ce-issue_12785' 2016-04-19 18:25:42 +02:00
tasks/gitlab
views
workers Do not fsck projects less than a day old 2016-04-26 13:35:52 +02:00
factories_spec.rb
rails_helper.rb
spec_helper.rb
teaspoon_env.rb