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
Comment #0.0
frank ralf commentedcorrected typo
Comment #1
frank ralf commentedSome more input:
Even if
git statuswill mark all feature files as "modified"git addwill 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/
Comment #1.0
frank ralf commentedtypo
Comment #2
damienmckennaI wonder if #1069884: Replace wrong style line ending in configuration on export would help with this?
Comment #3
damienmckennaThen 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?
Comment #4
damienmckennaI 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.