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 |
||
---|---|---|
.. | ||
abuse_report_mailer | ||
abuse_reports | ||
admin | ||
ci | ||
dashboard | ||
devise | ||
doorkeeper | ||
email_rejection_mailer | ||
emojis | ||
errors | ||
events | ||
explore | ||
groups | ||
help | ||
import | ||
invites | ||
kaminari/gitlab | ||
layouts | ||
notify | ||
profiles | ||
projects | ||
repository_check_mailer | ||
search | ||
shared | ||
sherlock | ||
snippets | ||
users | ||
votes |