-
Merge branch 'gitattributes' into 'master' · bfc6a0e3Rémy Coutable authored
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
bfc6a0e3
To find the state of this project's repository at the time of any of these versions, check out
the tags.
×