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 Don't load all of GitLab in mail_room 2016-02-26 18:48:13 -08:00
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 Improve and finish the fallback to the In-Reply-To and References header for the reply-by-email feature 2016-03-25 13:05:15 +01:00
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 Remove Profile::KeysController#new action 2016-03-03 16:13:59 -05:00
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 Ensure uploads dir exists when running backup specs 2016-03-30 15:40:49 +02:00
views Move "I should see Crowd login form" feature to a view spec 2016-02-24 17:38:13 -05:00
workers Do not fsck projects less than a day old 2016-04-26 13:35:52 +02:00
factories_spec.rb Add support for not Active Record based factories 2016-03-30 10:44:18 +02:00
rails_helper.rb
spec_helper.rb Move CarrierWave test env config to separate file 2016-03-30 13:57:01 +02:00
teaspoon_env.rb