Drupal 8 tries to ensure that all line endings are LF, both on checkout and checkin.
(See also https://www.drupal.org/node/1542048 and the .gitattributes file in the Drupal 8 root folder.)
Various files in Krumo and Kint use different line endings, which causes diffs when adding devel as a subtree to a repository with a Drupal 8 installation.
Steps to reproduce:
$ git clone --branch 8.0.x http://git.drupal.org/project/drupal.git
$ cd drupal
$ git remote add devel http://git.drupal.org/project/devel.git
$ git fetch devel
$ git subtree add --prefix=modules/devel devel 8.x-1.x
$ git status
Result:
modified: modules/devel/kint/kint/examples/overview.php
modified: modules/devel/kint/kint/scripts/source.reg
modified: modules/devel/kint/kint/scripts/source.vbs
modified: modules/devel/krumo/INSTALL
modified: modules/devel/krumo/LICENSE
modified: modules/devel/krumo/README
modified: modules/devel/krumo/TODO
modified: modules/devel/krumo/docs/Krumo/_class.krumo.php.html
modified: modules/devel/krumo/docs/Krumo/krumo.html
modified: modules/devel/krumo/docs/blank.html
modified: modules/devel/krumo/docs/classtrees_Krumo.html
modified: modules/devel/krumo/docs/elementindex.html
modified: modules/devel/krumo/docs/elementindex_Krumo.html
modified: modules/devel/krumo/docs/errors.html
modified: modules/devel/krumo/docs/index.html
modified: modules/devel/krumo/docs/li_Krumo.html
modified: modules/devel/krumo/docs/media/banner.css
modified: modules/devel/krumo/docs/media/lib/classTree.js
modified: modules/devel/krumo/docs/media/stylesheet.css
modified: modules/devel/krumo/docs/packages.html
modified: modules/devel/krumo/docs/ric_INSTALL.html
modified: modules/devel/krumo/docs/ric_LICENSE.html
modified: modules/devel/krumo/docs/ric_README.html
modified: modules/devel/krumo/docs/ric_TODO.html
modified: modules/devel/krumo/docs/ric_VERSION.html
modified: modules/devel/krumo/krumo.ini
modified: modules/devel/krumo/krumo.js
modified: modules/devel/krumo/skins/blue/skin.css
modified: modules/devel/krumo/skins/default/skin.css
modified: modules/devel/krumo/skins/green/skin.css
modified: modules/devel/krumo/skins/orange/skin.css
modified: modules/devel/krumo/skins/white/skin.css
The changes that git makes automatically are the desired outcome, but they should be committed to the devel project itself.
I didn't create separate issues for the Krumo and Kint components because this issue can easily be resolved by committing the automatic changes made by git.
Comment | File | Size | Author |
---|---|---|---|
#15 | devel-krumo-docs-format-2381779-15.patch | 308.29 KB | salvis |
| |||
#6 | devel-krumo-docs-format-2381779-6.patch | 243.57 KB | DuaelFr |
Comments
Comment #1
raveren CreditAttribution: raveren commentedHey, author of Kint here, I fixed the files in this commit:
https://github.com/raveren/kint/commit/5ee9217adfc964f318f66b3f4027e984f...
note, it's in the WIP branch
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedI'm happy to commit a fix for these files. Can you post the right set of commands to accomplish this? Once I do the subtree, how can I commit and push back to devel project? Or maybe there is another way to accomplish the fix.
Comment #3
DuaelFrKrumo being abandoned, I think we can at least reformat their doc files to stop annoying us ;)
Here is a patch that do that. It does not change anything but docs formatting.
Comment #4
DuaelFrOops sorry that one is better
(Patch in #3 has not been made from the module root and includes unrelated code)
Comment #6
DuaelFrI must have made a mistake...
Comment #7
salvisIf we're going to trash the blame history on a large scale then we should at least take the opportunity to fix all the white space issues including
-- removing all tabs and
-- removing all trailing white space.
Comment #8
TravisCarden CreditAttribution: TravisCarden at Acquia commentedNote that
devel/krumo/docs/media/images/Interface.PNG
is also a problem on case-sensitive file systems because its uppercase extension doesn't match the.gitattributes
pattern for images, so Git thinks it has CRLF line endings. If you let Git "fix" it, the image is corrupted. If you don't, there's no apparent way to get rid of the uncommitted change. Am I correct in perceiving from this thread that we're essentially talking about forking Krumo and fixing it for ourselves? Because, if so, we can rename the PNG file, too, and update the references to it.Comment #9
Jon@s CreditAttribution: Jon@s commentedJust wanted to add that most of them these appear to be fixed but there are still a few in kint:
devel/kint/kint/examples/overview.php
devel/kint/kint/scripts/source.reg
devel/kint/kint/scripts/source.vbs
Comment #10
willzyx CreditAttribution: willzyx commentedAfter #2712461: Upgrade Kint to the latest version there are not more issues with file permissions in kint. Moving to 7.x
Comment #11
salvisI've started with #6 and massaged it manually to...
Let's see what Dreditor thinks of it...
Comment #13
salvisTry harder...
Comment #15
salvisHarder still...
Comment #18
salvisThanks, DuaelFr and TravisCarden!