.gitattributes 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Drupal git normalization
  2. # @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
  3. # @see https://www.drupal.org/node/1542048
  4. # Normally these settings would be done with macro attributes for improved
  5. # readability and easier maintenance. However macros can only be defined at the
  6. # repository root directory. Drupal avoids making any assumptions about where it
  7. # is installed.
  8. # Define text file attributes.
  9. # - Treat them as text.
  10. # - Ensure no CRLF line-endings, neither on checkout nor on checkin.
  11. # - Detect whitespace errors.
  12. # - Exposed by default in `git diff --color` on the CLI.
  13. # - Validate with `git diff --check`.
  14. # - Deny applying with `git apply --whitespace=error-all`.
  15. # - Fix automatically with `git apply --whitespace=fix`.
  16. # Auto-detect text files, ensure they use LF.
  17. * text=auto eol=lf
  18. *.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  19. *.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
  20. *.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
  21. *.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
  22. *.info text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  23. *.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
  24. *.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  25. *.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  26. *.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  27. *.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  28. *.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
  29. *.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
  30. *.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  31. *.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  32. *.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
  33. *.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  34. *.test text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
  35. *.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
  36. *.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  37. *.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  38. *.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
  39. # Define binary file attributes.
  40. # - Do not treat them as text.
  41. # - Include binary diff in patches instead of "binary files differ."
  42. *.gif -text diff
  43. *.gz -text diff
  44. *.ico -text diff
  45. *.jpg -text diff
  46. *.png -text diff
  47. *.phar -text diff
  48. *.exe -text diff
  49. *.ttf -text diff