When running e.g. drush -fu on Windows 7 (Windows PowerShell) Features rewrites all files of a feature - even those which haven't changed - using Unix line endings. The same happens when using the GUI for re-creating a feature.

The problem is that Git will mark all files of a feature as "modified" which in fact they aren't. Git usually changes the line endings according to the operating system but tracks only its own changes (https://help.github.com/articles/dealing-with-line-endings).

It would be great, if Features would taking the underlying operating system into account when rewriting files.

Comments

frank ralf’s picture

Issue summary: View changes

corrected typo

frank ralf’s picture

Priority: Normal » Minor

Some more input:

Even if git status will mark all feature files as "modified" git add will only add those files to be committed which indeed have been altered. So the problem isn't as severe as it looked on first sight. Setting priority to "minor".

Also stubled across this useful article: http://timclem.wordpress.com/2012/03/01/mind-the-end-of-your-line/

frank ralf’s picture

Issue summary: View changes

typo

damienmckenna’s picture

Version: 7.x-1.0 » 7.x-2.x-dev
Issue summary: View changes
damienmckenna’s picture

Then again, no, that would just enforce the line-ending problem.

I suspect a note in the README.txt file might be useful, maybe even a note in hook_requirements?

damienmckenna’s picture

Status: Active » Closed (duplicate)

I think this should be handled by making #1069884: Replace wrong style line ending in configuration on export a setting, and adding some documentation to help developers adjust it accordingly.