#1111224: Introduce .gitattributes to end the CRLF/LF and binary diff horror, and detect/auto-fix whitespace errors introduced a .gitattributes file into Drupal core. However, this file defines macros which are only allowed at the top-level of a repository. This prevents Drupal from being installed in a subdirectory of a larger repository without causing errors:

[attr]drupaltext    text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
 not allowed: drupal/.gitattributes:13
[attr]drupalbinary  -text diff
 not allowed: drupal/.gitattributes:18

Proposed solution: remove the macros and expand drupaltext and drupalbinary to include all the attributes in the macros. This sacrifices some loss in readability for portability.

Comments

yched’s picture

Seeing similar errors when running git difftool -d

mikeker’s picture

@yched: Does this patch fix the errors when running difftool? (Sorry, not familiar with difftool).

Thanks.

yched’s picture

Status: Needs review » Reviewed & tested by the community

Just tested, yes, it does fix the errors with "git difftool -d" too.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 7919edf and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.